Skip to content

Loop ​

Iterates over an array of items or a fixed count, executing a connected sub-workflow once for each iteration.

Purpose ​

Use the Loop task when you need to perform the same sequence of steps repeatedly — once for each item in a list, or a fixed number of times. Each iteration runs to completion before the next begins, ensuring sequential processing. Connect downstream tasks to the Next output to define the per-iteration work, and optionally connect a task to the Finished output for any clean-up that should run once all iterations are done.

Loops can be nested — a Loop node placed inside another Loop's body works correctly. See Nested Loops below.

Inputs ​

FieldTypeRequiredDescription
OperationDropdownNoDetermines how the iteration count is defined. From Object Array loops over the items in an array; Count loops a fixed number of times.
Array ObjectTextNoThe array to iterate over. Each element becomes the current LoopItem for that iteration. Visible when Operation is From Object Array.
CountTextNoThe number of times to loop. Visible when Operation is Count.

Visibility Rules ​

Array Object is visible when Operation is From Object Array. Count is visible when Operation is Count.

Outputs ​

NameDescription
LoopItemThe current item being processed in this iteration. Available to all tasks within the loop body via {{LoopItem}}. In nested loops, always refers to the innermost active loop.
IterationIndexThe zero-based index of the current iteration.
IterationCountThe total number of iterations.

Each loop also writes its outputs under a scoped key — {{LoopName-taskId.LoopItem}} — that uniquely identifies that loop regardless of nesting depth. Use the scoped form when you need to reference an outer loop's current item from inside an inner loop body.

Examples ​

Loop over an array of objects

Process each user in a list one at a time.

FieldValue
OperationFrom Object Array
Array ObjectGetUsers.Result

Connect downstream tasks to the Next output. Reference {{LoopItem}} within those tasks to access the current user.

Loop a fixed number of times

Repeat a task five times regardless of data.

FieldValue
OperationCount
Count5

Nested Loops ​

A Loop node can be placed inside another Loop's body. The inner loop runs to completion for every iteration of the outer loop, exactly as you would expect.

Graph structure:

[Outer Loop] --Next--> [Task A] --> [Inner Loop] --Next--> [Task B] --Loopback--> [Inner Loop]
                                                  --Finished--> [Task C] --Loopback--> [Outer Loop]
[Outer Loop] --Finished--> [Task D]

Referencing items from both loops:

Because {{LoopItem}} always refers to the innermost active loop, tasks inside the inner loop body should use the scoped token to reach the outer loop's current item:

TokenResolves to
{{LoopItem}}Inner loop's current item
{{IterationIndex}}Inner loop's current index
{{OuterLoopName-taskId.LoopItem}}Outer loop's current item
{{OuterLoopName-taskId.IterationIndex}}Outer loop's current index

The scoped token format is {{NodeName-taskId.Property}} — the same pattern used by all other node output references. The task ID is visible in the node's properties panel in the workflow editor.

Tentech