- 04 Apr 2025
- 2 Minutes to read
- Print
- PDF
Repeat for each loop
- Updated on 04 Apr 2025
- 2 Minutes to read
- Print
- PDF
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.