Inputs
Outputs
The Loop exposes loop-scoped variables to the blocks nested inside it. Loop-scoped means they exist only while the loop runs.
Reference the item being processed inside the loop as
{{ steps.loop.current_item }}. Read its attributes with dot notation, such as {{ steps.loop.current_item.owner }}.
Behavior
The Loop runs its nested blocks in sequence for each item, from the first item in the iterable to the last. Each iteration is a fresh pass through the nested blocks.Current item holds that iteration’s item.
The block has two exit paths. The Next step path leads to the first block of each iteration and runs once per item. The Complete path runs a single time, after the final iteration finishes. A summary step such as a Slack post belongs there, not inside the loop body.
When the iterable is empty, the loop runs zero iterations and continues straight to the Complete path. A Limit of 25 against a 40-item iterable processes the first 25 items and then completes.
In the run viewer, the < and > arrows above the Loop step through individual iterations. This is how you find the one iteration that failed in a run of many.
Gotchas
- Only the first record is processed. Wiring a Find records output straight into a single-record block acts on the first match alone and silently skips the rest. Insert a Loop between the find block and the action, then point the action at
Current item. - Post-loop steps run per iteration. A block placed inside the loop container runs once for every item. A “swept 40 deals” summary posted there fires 40 times. Move any once-per-run step onto the Complete path.
- Credits scale with the iteration count. The Loop is free, but a paid nested block multiplies by the number of items. A 1-credit Create task across 40 deals costs 40 credits. Set the
Limitinput low while testing. Add a free Filter onCurrent itemto skip items before they reach a paid block. - Nested loops are not available. You cannot place a Loop inside another Loop. Do not try to nest iteration on the canvas. Reshape the data upstream into a single flat list first, then iterate over that one list.
Examples
Creating a task for every stale deal owner
A scheduled sweep finds open deals with no recent activity and opens a follow-up task for each owner.
Result: one follow-up task is created for the owner of each stale deal, capped at 25 deals per run.
Enrolling every contact on a deal into a sequence
A deal reaching a late stage enrolls each linked contact into a sequence, one person per call.
Result: every contact linked to the deal is enrolled. This works because Enroll in sequence accepts a single person, and the loop hands it one contact at a time.
Upserting each lead from a webhook array
A webhook delivers a batch of leads as a JSON array, and the loop creates or updates a record for each entry. Upserting means it updates the record if it already exists and creates it if it does not.jane@acme.com for Priya Sharma, is upserted once. No duplicates are created for emails that already exist.