Using Loop Nodes

Iterate over lists of items using loop nodes.

Overview

A Loop node repeats a set of steps for every item in a collection. If an earlier step returned 50 orders, the loop runs its body once per order so you can process each item with its own connector calls, transforms, and conditions.

Loops sit between flat sequences (one step after another) and parallel fan-out (every branch at once). They are the right choice when the work is per-item, the items are known up front, and you want one place to consolidate results when the iteration ends.

Configuration

  1. Drop a Loop node onto the canvas from the node palette.
  2. Set Collection to a template expression that resolves to an array, such as {{ step1.orders }} or {{ input.items }}.
  3. Connect the Body output to the nodes that should run for each item.
  4. Connect the Complete output to the nodes that should run once after every iteration finishes.

Loop Variables

  • {{ item }} - the current array element being processed.
  • {{ index }} - the zero-based iteration counter.

Configuration Reference

  • Collection - the array to iterate. Required. Must resolve to an array at runtime.
  • Max iterations - safety cap, default 10000. Reduce this for known-small inputs to catch runaway loops early.
  • Body output - executes once per item.
  • Complete output - executes once, after the last iteration, with the collected results available downstream.

Usage Examples

  • Per-order processing - a Shopify Connector node returns recent orders, a Loop iterates them, and the body calls a fulfillment API plus a Send Email node for each customer.
  • Bulk enrichment - a CSV is parsed into rows, a Loop iterates the rows, and the body upserts each record into a CRM through a Connector node.

Tips

  • If iterations are independent and order does not matter, consider a Parallel node instead for shorter total runtime.
  • Use a Transform node before the loop to trim the array to only the fields the body actually needs. This keeps logs small.
  • Add a Condition node inside the body to skip items that do not qualify, rather than filtering after the loop.

Common Pitfalls

  • Passing an object instead of an array to Collection causes the loop to fail at runtime. Verify the field is a list in execution logs.
  • Referencing {{ item }} or {{ index }} outside the loop body returns nothing. They only exist inside the iteration.
  • Very large collections multiply connector calls and credit usage. Cap the input or split work across runs.

Related Articles

Learn More

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.