The Loop node takes an array from upstream and exposes each item to downstream nodes. It’s the standard answer when an extracted document yields a variable-length list (line items, attachments, contacts) and you need to act on each one.Documentation Index
Fetch the complete documentation index at: https://docs.docpipe.ai/llms.txt
Use this file to discover all available pages before exploring further.
This is the v1 release of the Loop node. It resolves the source array and exposes the items in its payload so downstream nodes can iterate using template filters (
{{loop.payload.results | first}}, {{loop.payload.results[0]}}). Per-item child-workflow fan-out (running the downstream subgraph N times, once per item) is on the roadmap as a follow-up.Configuration
| Field | Description |
|---|---|
| Source array | A template expression that resolves to an array, for example {{extract.payload.lineItems}} |
| Sequential execution | Reserved for the fan-out version. Has no effect today. |
| Failure mode | Reserved for the fan-out version. Has no effect today. |
Output
The node’s payload contains:{{loop.payload.results}}for the full array{{loop.payload.results | length}}for the count{{loop.payload.results[0]}}for the first item{{loop.payload.results[-1]}}for the last item{{loop.payload.results | sum}},{{loop.payload.results | join: ', '}}, etc.
Recipes
Send a callback for each line item (single-batch): Use a Callback Output node with body:{{payload.itemCount}} >= 10, and an Otherwise edge to the alternative path.
Related
- Expressions and filters for filter syntax (
length,first,sum, etc.) - Conditional routing for branching on iteration counts and other rules