Control Flow

Loop Node Reference

Technical reference for the `loop` node, including sequential, parallel, and stage-level execution modes.

Updated 2 min read

Overview

loop iterates over an input array and executes a subgraph for each item. It is the core batch-processing node in the workflow engine.

Configuration / Settings

SettingTypeRequiredDetails
processingModesequential, parallel, stage-levelNoDefaults to sequential.
concurrencynumberNoClamped to the user's plan limit at runtime.

Inputs Expected

  • The node expects an array. Non-array input is wrapped into a one-item array.
  • The loop body is defined by edges connected from the node's loop handle.

Variables Exported / Outputs

Output shape: any[]

  • Each loop iteration returns the output of the loop body's end node.
  • Inside the loop body, resolveVariables prefers context.inputData for the current item, which is what makes {{row.email}}-style access work naturally during iteration.

Common Use Cases

  • Generate one filled document per spreadsheet row.
  • Apply the same PDF operation to every uploaded file.
  • Fan out page images or converted outputs before zipping or emailing them.

Edge Cases

  • parallel and stage-level modes are gated by plan-based concurrency limits.
  • Stage-level mode works best on simple linear subgraphs.
  • If the loop body has no connected start node, the loop completes as a no-op.