For Each node

Status: Current | Last reviewed: 2026-10-12

Runs a nested body of blocks once per item in a list or workflow dataset. Large datasets run durably with bounded concurrency, retries, and backoff.

Behavior

Add For Each from Add to flow, set Items to iterate, then select the card's maximize button (Open For Each body). Use + between Each item and Next item to add steps. The body can contain decisions and joins; it reflows as you insert steps. The parent card stays compact and has no inline expand/collapse control.

The runtime resolves the collection at items_path and runs this body once per item. Reference the current item as {{iterator.current_item.*}} and the index as {{iterator.index}}. Select Each item for collection and scheduling settings, or Next item for completion and error behavior. The edge below the parent For Each card continues after all iterations finish.

Iteration mode controls normal array inputs. Sequential runs one item at a time; Parallel runs multiple list items at once. Concurrency applies only to these in-memory array inputs and defaults to Auto: 1 for Sequential, all available items for Parallel.

Body blocks remain on their own focused canvas when you turn Show phases on or off in the parent workflow. Return using the breadcrumb or Close focused view. Body changes save with the workflow.

Dataset execution defaults to Auto. Auto runs workflow_dataset handles durably with Dataset max in-flight, retry, and backoff settings, while normal arrays run inline. On error defaults to Collect, which records failed items and continues; choose Fail Fast when one failed item should stop remaining work. Max items is optional and defaults to Unlimited.

You can add this node from the workflow editor add-node menu when building a flow.

Configuration options

Option Required Type Values / default What it controls
Items to iterate (items_path) Yes string Merge-template or dot path that resolves to a list or workflow_dataset handle. Examples: {{attachments}}, {{trigger.payload.items}}, {{salesforce_query.dataset}}.
Iteration mode (mode) No string sequential, parallel; Default: sequential Sequential runs one item at a time and preserves order. Parallel runs list items concurrently using Concurrency when set, otherwise all items.
Concurrency (concurrency) No integer In-memory list concurrency for normal array inputs. Auto uses 1 for Sequential and all available items for Parallel. Advanced setting.
Dataset execution (execution_mode) No string auto, inline, durable; Default: auto Auto runs workflow_dataset inputs durably and normal array inputs inline. Choose Inline only when you want dataset handles rejected, or Durable only when this loop must receive a workflow_dataset. Advanced setting.
Dataset max in-flight (max_in_flight) No integer Default: 20 Durable workflow_dataset concurrency for this For Each run. This is separate from Concurrency, which only applies to in-memory array inputs. Advanced setting.
Max retries (max_retries) No integer Default: 3 Retries per durable dataset item when the body returns an error, including 429/503 provider responses. Advanced setting.
Backoff base seconds (backoff_base_seconds) No integer Default: 5 Initial exponential backoff window for durable dataset item retries. Advanced setting.
Backoff max seconds (backoff_max_seconds) No integer Default: 300 Maximum exponential backoff window for durable dataset item retries. Advanced setting.
On error (on_error) No string collect, fail_fast; Default: collect Collect records failed items and lets later items continue. Fail Fast cancels pending work after the first error and marks the For Each node as errored. Advanced setting.
Max items (max_items) No integer Optional safety cap for normal array inputs. Leave blank for Unlimited. Advanced setting.

Outputs

Output Type What it contains
count integer Number of iterations run.
successes integer Iterations that completed without error.
failures integer Iterations that raised.
durable boolean True when the For Each ran from a workflow_dataset.
items array Per-iteration records: {index, status, result, outputs, error?}.

See also