Repeat for each loop
  • 04 Apr 2025
  • 2 Minutes to read
  • PDF

Repeat for each loop

  • PDF

Article summary

Repeat for Each Loop

A Repeat for each loop executes a set of actions for every item in a given list. The selected actions must use data output from the loop's data tree to ensure each item is processed. Any actions nested within a Repeat for each block will be executed for all items in the list.

For example, you can use a Repeat for each block to iterate through a list of invoice line items and process each one individually.

Repeat for each is a type of Repeat control statement. To add a Repeat for each loop to a recipe, click the + (plus) button in the recipe editor, then select Repeat for each.

Figure: Actions

Integration Hub inserts a step block into the recipe, allowing you to configure the application and action to be performed for each item in the list

Figure: Repeat for each

Example: Using a Repeat for Each Loop

This example illustrates how to utilize the Repeat for Each loop to check Jira issues linked to other application. If no corresponding issue exists in Jira, a new issue will be created.

Figure: Repeat for each loop

The list datapill must be provided as input to the Repeat for Each block. When selecting the input list field, only list-type datapills are available in the data tree. These datapills can be recognized by their stack icon, as shown in the following image.

Batch Processing with Repeat for Each

In some cases, the upstream system sends data at a faster rate than the downstream system can handle. The Repeat for Each in Batches feature helps manage this by allowing data to be processed in smaller, configurable batch sizes. Large datasets are automatically divided into smaller batches, ensuring efficient processing while guaranteeing that each item is processed only once.

Using the Repeat for Each in Batches Feature

To configure Repeat for each in batches feature, perform the following steps:

  1. Log in to your Integration Hub account and navigate to Projects.

  2. Click Create, then select Recipe to create a new recipe, or open an existing recipe and click Edit Recipe.

  3. Click the + (plus) button to add a new step.

  4. Select Repeat for Each.

  5. A block of steps is added to the recipe, with the Set up list to repeat steps for each item step automatically selected.

  6. Enter an Input list datapill in the Input List field.

  7. From the Repeat Mode drop-down menu, select Batch of items.

  8. Specify the Batch Size. If not set or set to a value less than 1, it defaults to 100. A datapill can also be used to determine batch size dynamically.

  9. The For Each statement will reflect this configuration with the Batch tag.

    Figure: Bulk Processing


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.