For Loop
Overview
The for expression is a foreach loop that iterates over an iterable (array/list from the data bank), binding each item to an each & index variable. It executes steps sequentially per iteration, then aggregate outputs into the output_key as a list of dicts. It is Ideal for bulk actions like user notifications.
Output Aggregation Deep Dive
The for expression outputs a clean list of objects, where one object contains the results of an iteration. An example loop with two actions,incident_manager_profile and updated_manager_profile, expect:
You can access the variables the same way you access any others in the data bank; e.g., data.for_expression_output_result[0].incident_manager_profile.status will yield INACTIVE
Low-Code Editor
Add a For Loop Step, bind iterable, define loop variables, and add expressions inside.
You can only bind an iterable in in, you cannot create a list on the fly using DSL such as ["a", "b"], only data bank variables work.
You can create a precursor script action to output a list and pass it to in .

- Bind the Iterable
(in): Onlydata bankvariables work, inline lists like["a","b"]will fail. - Define
each&index: Seteachfor item (e.g.,user) and index (e.g.,user_index), these are only scoped to the for loop. - Add expression & Set
output_key: Add expressions to each step. Make sure to add readable output keys.
Syntax Reference
Schema
Fields
Practical Examples
Example 1: Actions in Batch
Run actions for each user in a list
Compound Action
Expected Output
The compound actions fetches the records of the users and consequentially uses a for loop to send a message to each user.
Example 2: Outage Ticket Processing
Batch-update manager for open tickets
Sample input argument
Compound Action
Expected Output
The for loop iterates through each ticket, it finds the incident manager for the ticket and updates the status of the incident manager to ON_CALL