Appearance
For Each (Action)
The For Each node iterates over input rows and executes a saved action pipeline for each one. The current row is passed as the parent context to the sub-pipeline.
This node is also listed under Transforms -- it serves both as a transform (producing a mapped array of results) and as an action node (executing side effects for each item).
Configuration
| Property | Type | Default | Description |
|---|---|---|---|
actionId | number | -- | Required. The ID of the saved action to run for each row. |
Input
Accepts a single object or an array of rows.
Output
Returns an array of results, one per input row. Each result is whatever the sub-pipeline's output node returns.
How It Works
- The node loads the saved action definition by
actionId. - For each input row, it creates a new
PipelineExecutorinstance. - The current row is set as the parent context of the sub-pipeline.
- The sub-pipeline is executed, and its result is collected.
- All results are returned as an array.
For a single object input, the action runs once and the result is returned directly.
Example Use Cases
Process each order item
For each item in an order, run an action that updates inventory:
Related Items (order_items) → For Each (actionId: "update_inventory") → ResultSend individual notifications
For each user in a list, run an action that sends a personalized email:
Table Query (users) → For Each (actionId: "send_notification") → ResultBatch create order items from cart
For each cart item, run an action that creates an order item record:
Table Query (cart_items) → For Each (actionId: "create_order_item") → OutputWARNING
The For Each node creates a new pipeline executor for each row. For large datasets, this can be slow. Use it for small to medium datasets (tens to hundreds of items), not for bulk processing thousands of rows.
TIP
The sub-pipeline accesses the current row via the Parent Data or Context node. All parent row fields are available as context variables.