TheFor Each Paralleltask lets you run other
integrations (sub-integrations) from your main integration. As the task name
suggests, the sub-integrations run in parallel.
This task uses the APITrigger IDas a handle to identify the integrations to run.
For example, if you specify the APITrigger IDasapi_trigger/APITriggerX, the task runs all the sub-integrations that have
theapi_trigger/APITriggerXtrigger ID.
After running a sub-integration, you can also
read the response of the sub-integration in your main integration. Use this task to run sub-integrations as dependencies
of the main integration.
Before you begin
Ensure that you haveattached a user-managed service accountto your integration. If your integration does not have user-managed service account configured, then by default thedefault service account(service-PROJECT_NUMBER@gcp-sa-integrations.iam.gserviceaccount.com) is used for authentication.
Ensure that your service account has theApplication Integration InvokerIAM role. For information about granting roles to a service account, seeManage access to service accounts.
Configure the For Each Parallel task
To configure theFor Each Paralleltask:
In the Google Cloud console, go to theApplication Integrationpage.
TheIntegrationspage appears listing all the integrations available in the Google Cloud project.
Select an existing integration or clickCreate integrationto create a new one.
If you are creating a new integration:
Enter a name and description in theCreate Integrationpane.
Select a region for the integration.
Select a service account for the integration. You can change or update the service account details of an integration any time from theinfoIntegration summarypane in the integration toolbar.
ClickCreate. The newly created integration opens in theintegration editor.
In theintegration editornavigation bar, clickTasksto view the list of available tasks and connectors.
Click and place theFor Each Paralleltask element in the integration editor.
Click theFor Each Paralleltask element on the designer to open theFor Each Paralleltask configuration pane.
Configure the displayed fields using theConfiguration propertiesfor the task
as detailed in the tables below.
All changes to the properties are saved automatically.
Configuration properties
This section describes the configuration properties of
theFor Each Paralleltask.
Input properties
Property Name
Parameter Name
Data type
Description
Array Selection
List to iterate
An array of type string, integer, double, or JSON.
List of values for which the sub-integrations must run.
A separate sub-integration thread runs for each value in the list, and all
the threads run in parallel.
Trigger ID of the published sub-integration to run.
This value is available in theTrigger IDfield of theAPI Triggerin the sub-integration.
Execution strategy
N/A
SYNC: Runs the sub-integrations in synchronous mode. In this mode, the main integration
waits for the sub-integrations to complete before continuing with the downstream tasks.
ASYNC: Runs the sub-integrations in asynchronous mode. In this mode, the main integration
does not wait for the sub-integrations to complete. Immediately after calling the sub-integrations,
the main integration runs the downstream tasks.
Run all integrations with this API Trigger ID
N/A
Runs all integrations
that have the same APITrigger ID.
For example, if integrationAand integrationB, have the same APITrigger ID, both the integrationsAandBare run for each item inList to iterate.
Note: If you select this option, the response from the sub-integrations
is not be available in the main integration. If you want to use the response of the
sub-integrations, select theRun a single integrationoption.
Run a single integration
N/A
Runs only the integration specified in theIntegration namefield. You can use the response from the sub-integrations
by configuring theCollect values from sub-integration output(s)section.
On each execution
Where to map individual array elements
String
The name of the sub-integration input variable where the array elements should be mapped. The array
elements can be mapped directly
to a sub-integration input variable. If a single sub-integration is selected, you can select the
sub-integration input variable from a dropdown list.
Map to additional sub-integration input(s)
String
Additional sub-integration mapping option.
Integration variable to map from: The name of the variable in the current integration to
be passed to the sub-integration's input variable.
Sub-integration input to map to: The name of the sub-integration input variable to map to.
This field takes
values in the form of key-value pairs, where the key is a variable in the main integration, and
the value is the corresponding input variable in the sub-integration.
For example, consider your main integration has theproductIDvariable, which you want to map to thesubIntProductIDsub-integration variable; you must
selectproductIDfrom theIntegration variable to map fromfield and entersubIntProductIDin theSub-integration input
to map tofield.
Collect values from sub-integration output(s)
String
If the execution strategy is synchronous (SYNC) and a single sub-integration (Run a single integration) is selected, the outputs of the sub-integration can be collected into array variables in the current integration.
Sub-integration output to collect from: The name of the sub-integration output variable to be aggregated.
Integration variable to collect into: The name of the variable in the current integration to collect the
aggregated outputs.
Execution Settings
Integrations to execute at a time (parallel)
Integer
Maximum number of parallel executions allowed for sub-integrations. The default value is50(10000maximum).
All sub-integrations in a cohort run completely before the next cohort of sub-integrations run.
Ignore failures
Boolean
You can specify any one of the following values:
True: Task ignores sub-integration failures and runs all executions.
False: Task fails for sub-integration failures and ends all executions.
Best practices
We recommend the following best practices when using theFor Each Paralleltask:
Set your cohort size based on any quota limitations imposed by your sub-integrations.
Use aSYNCexecution strategy when you want to collect the output of the sub-integration for later use.
Use anASYNCexecution strategy when your sub-integration might run longer than2 minutes.
For information about the usage limits that apply to theFor Each Paralleltask, seeUsage limits.
Considerations
In general, do not use aSYNCexecution strategy if your sub-integration takes longer than2 minutesto run
or you plan to use this task in conjunction with naturally asynchronous tasks like the Approval task.
Error handling strategy
An error handling strategy for a task specifies the action to take if the task fails due to atemporary error. For information about how to use an error handling strategy, and to know about the different types of error handling strategies, seeError handling strategies.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe For Each Parallel task enables the execution of multiple sub-integrations in parallel from a main integration, enhancing efficiency.\u003c/p\u003e\n"],["\u003cp\u003eThis task utilizes an API Trigger ID to identify and run the specified sub-integrations, and can run all sub-integrations with the same ID or target one specifically.\u003c/p\u003e\n"],["\u003cp\u003eYou can configure sub-integrations to run synchronously (SYNC), where the main integration waits for completion, or asynchronously (ASYNC), where it doesn't wait.\u003c/p\u003e\n"],["\u003cp\u003eThe task allows for passing data to sub-integrations and optionally collecting their output back into the main integration, but not when running multiple sub-integrations simultaneously.\u003c/p\u003e\n"],["\u003cp\u003eIt's recommended to use the SYNC strategy when the output of the sub-integration is needed, and the ASYNC strategy when sub-integrations might take longer than 2 minutes to run.\u003c/p\u003e\n"]]],[],null,["# For Each Parallel task\n\nSee the [supported connectors](/integration-connectors/docs/connector-reference-overview) for Application Integration.\n\nFor Each Parallel task\n======================\n\nThe **For Each Parallel** task lets you run other\nintegrations (sub-integrations) from your main integration. As the task name\nsuggests, the sub-integrations run in parallel.\n\nThis task uses the API **Trigger ID** as a handle to identify the integrations to run.\nFor example, if you specify the API **Trigger ID**\nas `api_trigger/APITriggerX`, the task runs all the sub-integrations that have\nthe `api_trigger/APITriggerX` trigger ID.\n\nAfter running a sub-integration, you can also\nread the response of the sub-integration in your main integration. Use this task to run sub-integrations as dependencies\nof the main integration.\n\nBefore you begin\n----------------\n\n- Ensure that you have [attached a user-managed service account](/application-integration/docs/access-control#add-service-account) to your integration. If your integration does not have user-managed service account configured, then by default the [default service account](/application-integration/docs/access-control#default-service-account) (`service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-sa-integrations.iam.gserviceaccount.com`) is used for authentication.\n- Ensure that your service account has the **Application Integration Invoker** IAM role. For information about granting roles to a service account, see [Manage access to service accounts](/iam/docs/manage-access-service-accounts).\n\nConfigure the For Each Parallel task\n------------------------------------\n\nTo configure the **For Each Parallel** task:\n\n1. In the Google Cloud console, go to the **Application Integration** page.\n\n [Go to Application Integration](https://console.cloud.google.com/integrations)\n2. In the navigation menu, click **Integrations** .\n\n\n The **Integrations** page appears listing all the integrations available in the Google Cloud project.\n3. Select an existing integration or click **Create integration** to create a new one.\n\n\n If you are creating a new integration:\n 1. Enter a name and description in the **Create Integration** pane.\n 2. Select a region for the integration. **Note:** The **Regions** dropdown only lists the regions provisioned in your Google Cloud project. To provision a new region, click **Enable Region** . See [Enable new region](/application-integration/docs/enable-new-region) for more information.\n 3. Select a service account for the integration. You can change or update the service account details of an integration any time from the info **Integration summary** pane in the integration toolbar. **Note:** The option to select a service account is displayed only if you have enabled integration governance for the selected region.\n 4. Click **Create** . The newly created integration opens in the *integration editor*.\n\n\n4. In the *integration editor* navigation bar, click **Tasks** to view the list of available tasks and connectors.\n5. Click and place the **For Each Parallel** task element in the integration editor.\n6. Click the **For Each Parallel** task element on the designer to open the **For Each Parallel** task configuration pane.\n7. Configure the displayed fields using the [Configuration properties](#params) for the task as detailed in the tables below.\n\n\n All changes to the properties are saved automatically.\n\nConfiguration properties\n------------------------\n\n\nThis section describes the configuration properties of\nthe **For Each Parallel** task.\n\n### Input properties\n\nBest practices\n--------------\n\nWe recommend the following best practices when using the **For Each Parallel** task:\n\n- Set your cohort size based on any quota limitations imposed by your sub-integrations.\n- Use a **SYNC** execution strategy when you want to collect the output of the sub-integration for later use.\n- Use an **ASYNC** execution strategy when your sub-integration might run longer than **2 minutes**.\n\nFor information about the usage limits that apply to the **For Each Parallel** task, see [Usage limits](/application-integration/docs/quotas#usage-limits).\n\nConsiderations\n--------------\n\nIn general, do not use a **SYNC** execution strategy if your sub-integration takes longer than **2 minutes** to run\nor you plan to use this task in conjunction with naturally asynchronous tasks like the Approval task.\n\nError handling strategy\n-----------------------\n\n\nAn error handling strategy for a task specifies the action to take if the task fails due to a [temporary error](/application-integration/docs/error-handling). For information about how to use an error handling strategy, and to know about the different types of error handling strategies, see [Error handling strategies](/application-integration/docs/error-handling-strategy).\n\nQuotas and limits\n-----------------\n\nFor information about quotas and limits, see [Quotas and limits](/application-integration/docs/quotas).\n\nWhat's next\n-----------\n\n- Learn about [all tasks and triggers](/application-integration/docs/all-triggers-tasks).\n- Learn how to [test and publish an integration](/application-integration/docs/test-publish-integrations).\n\n- Learn about [error handling](/application-integration/docs/error-handling-strategy).\n- Learn about [integration execution logs](/application-integration/docs/introduction-logs)."]]