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
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 .

(in): Only data bank variables work, inline lists like ["a","b"] will fail.each & index: Set each for item (e.g., user) and index (e.g., user_index), these are only scoped to the for loop.output_key: Add expressions to each step. Make sure to add readable output keys.Run actions for each user in a list
The compound actions fetches the records of the users and consequentially uses a for loop to send a message to each user.
Batch-update manager for open tickets
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