---
title: "Repeat while loop"
slug: "repeat-while-loop-2"
tags: ["Conditional Loop", "Integration Hub", "Repeat While Loop"]
updated: 2025-12-23T11:54:23Z
published: 2025-12-23T11:58:53Z
canonical: "help.symphonysummitai.com/repeat-while-loop-2"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.symphonysummitai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Repeat while loop

A **Repeat While loop** executes the actions within a block at least once and continues looping as long as the specified condition is met. This type of Repeat control statement is also known as a Do While loop, as it performs one or more actions while the condition remains true.

To add a **Repeat while loop** to a recipe, click the + (plus) button in the recipe editor to create a new step, and then select Repeat while.

![](https://cdn.document360.io/62351b42-cfbd-43ad-8ce1-82b8f455337f/Images/Documentation/steps.png)Figure: Recipe steps

Integration Hub inserts a block of steps into the recipe where you can configure the app and the action to perform while a condition is met.

![](https://cdn.document360.io/62351b42-cfbd-43ad-8ce1-82b8f455337f/Images/Documentation/image-1765520152243.png)

A **Repeat While** loop is applicable in scenarios such as the following:

- Retrieving paginated data using an offset value or a next-page token.
- Executing one or more actions a set number of times.
- Repeating actions until a specific condition is met.

## **Loop Iteration Limit**

A Repeat While loop can iterate up to 50,000 times. This limit prevents excessive task consumption. Ensure the condition is designed to allow the loop to exit appropriately.

For instance, if an action repeats while a variable remains true, but there is no logic to change it to false, the loop will continue indefinitely until it reaches the iteration limit.

## **How to Create a Repeat While Conditional Loop?**

Creating a **Repeat While** loop involves the following steps:

1. **Define Actions to Repeat (REPEAT):** Specify the actions that should be repeated within the loop.
2. **Define a Condition to Check (WHILE):** Set a condition that determines when the loop should continu**e or stop.**

> [!NOTE]
> Note
> 
> Actions execute at least once

Since this is a Do-While loop, the actions inside the loop will execute at least once before the condition is checked. If the condition is met, the loop will continue repeating.

### **Step 1: Define Actions to Repeat**

1. Log in to Integration Hub account. The Orchestrate platform opens by default.
2. Navigate to **Projects**.
3. Click **Create** button and select **Recipe** to create a new recipe or choose an existing Recipe and click Edit Recipe.
4. Click the + (plus) icon under **Actions** to add a new step.
5. Select **Repeat while**.
6. Choose the application, connection, and action you want to repeat.
7. Fill in the required fields to complete the action setup.

![](https://cdn.document360.io/62351b42-cfbd-43ad-8ce1-82b8f455337f/Images/Documentation/image-1765520225485.png)

Figure: Repeat

### **Step 2: Specify the Condition for Repetition**

1. In the recipe editor, select **Set Up Condition** to define the criteria for repeating the steps.

![](https://cdn.document360.io/62351b42-cfbd-43ad-8ce1-82b8f455337f/Images/Documentation/image-1765520348264.png)

Figure: Set Up condition
2. Choose a data pill from the **Recipe Data** interface or manually input a value in the **Data Field**.

![](https://cdn.document360.io/62351b42-cfbd-43ad-8ce1-82b8f455337f/Images/Documentation/image-1765520388629.png)

Figure: While action
3. Choose a condition from the **Condition** dropdown menu (example, less than)
4. Select a data pill from the **Recipe Data** interface or manually enter a value in the **Value** field.
5. *(Optional)* Click **+ (plus)** below the **Value** field to add an additional **WHILE** condition and select a logical operator:
  1. **AND**: All conditions must be met for the loop to continue.
  2. **OR**: At least one condition must be met for the loop to continue.
6. Multiple conditions can be added, but all must follow the same logical operator.

## Execute a Fixed-Count Loop

The **Fixed-Coun**t loop runs for a predetermined number of iterations. To implement this, use the **Index** datapill, which automatically tracks the loop's iteration count and is available in the output of the **REPEAT** step.

The loop terminates when the **Index** value reaches 4.

For Example, to configure the loop, perform an action exactly five minutes:

- **Data Field**: **Index** data pill
- **Condition**: **Equal**
- **Value**: **4**

![](https://cdn.document360.io/62351b42-cfbd-43ad-8ce1-82b8f455337f/Images/Documentation/image-1765520465924.png)

Figure: Fixed loop count

1. Log in to **Integration Hub** and go to **Projects**.
2. Click **Create**, then select **Recipe** to create a new recipe, or choose an existing recipe and click **Edit Recipe**.
3. Click the **+ (plus)** button to add a **Repeat While** step.
4. Configure the action to be repeated within the loop block.
5. In the **WHILE** step of the loop block, set the condition to check if the **Index** datapill from the **REPEAT** step output equals **4**.

### [**m**](https://docs.workato.com/features/conditions.html#examples-12)

## Reference

![](https://cdn.document360.io/62351b42-cfbd-43ad-8ce1-82b8f455337f/Images/Documentation/agreement_7026105.png) **Documentation**

[Repeat While Loop](https://docs.workato.com/en/recipes/loops.html)
