See the supported connectors for Application Integration.
For Each Loop task
The For Each Loop task lets you make repeated calls to a sub-integration from your current (main) integration. The task iterates over the configured array variable and calls the sub-integration for each element in the array. The number of times the sub-integration is called is equal to the size of the array variable.
The API Trigger ID and the Integration name identifies the sub-integration you want to run.
The task also lets you collect the response from each sub-integration run and store the value in your current integration for use in downstream tasks. You can use any of the following approach to collect the responses:
- Collate the response of each run in an array variable, where each element of the array has the
response from one particular run. To collate the responses, configure
Collect values from sub-integration output(s)property.
- Aggregate the responses of all the runs in a single variable. To aggregate the responses, configure
Response parameter override mappingproperty.
The following table describes the configuration properties of the For Each Loop task.
||String||Trigger ID of the sub-integration to run.
This value is available in the Trigger ID field of the API Trigger in the sub-integration.
||String||Name of the sub-integration to run.|
||An array of type Boolean, String, Integer, Double, or JSON.||List of values for which the sub-integration should run. The
sub-integration runs for each value in the list, one after the other.
You can pass the iterated value to the sub-integration by setting the Iteration element sub-integration mapping property. In this property, specify the variable in the sub-integration to which the iterated value must be mapped.
||N/A||Variable in the sub-integration for which the current iterated element must be assigned.|
||N/A||Additional values to pass from the current integration to the sub-integration.
The values of this property are in the form of key-value pairs, where the key is a variable
in the current integration, and the value is the corresponding input variable in the
sub-integration. For example, suppose
your main integration has the
||N/A||Collate the results of the sub-integration runs.
Every time the sub-integration runs,
you can store the output of the sub-integration in an array variable of the current integration.
Select the sub-integration's output variable from the Sub-integration output to collect from
drop-down and the array variable in current integration from the
Integration variable to collect into drop-down. Each element of the array has the response from a
particular sub-integration run. For example, if the array variable is
||N/A||Read the output variable of a sub-integration run and store it in a variable of
the current integration.
Select the sub-integration's output variable from the Sub-integration output to map from drop-down, and select the corresponding variable in the current integration from the Integration variable to override drop-down. You can send the overridden variable in the current integration to the next sub-integration run by mapping the variable in the Map to additional sub-integration input(s) property. As a result, you can cumulatively aggregate the responses from the sub-integration runs.
||JSON array||The output variable that has the execution details of the sub-integrations like sub-integration execution ID, errors messages, and variable values passed during execution.|
For information about the usage limits that apply to the For Each Loop task, see Usage limits.
Retry on failure
You can configure various retry strategies to handle errors in a task. The retry strategies allow you to specify how to rerun the task or integration in case of an error. For more information, see Error handling strategies.