Skip to content

For each

A For each step runs its each path once for every item in a list, one after another or several at a time. When all items are done, the workflow continues on done. The each path ends where it stops or where it leads back to the For each step.

  • Check each document a customer uploaded.
  • Send a reminder for every instalment that is overdue.
  • Create a pickup request for every item in a multi-seller order.
  • The steps are different from each other, not the same steps per item. Use Parallel.
  • Each item needs its own long, separate workflow. Use Schedule with one run per item, or a Sub-workflow inside the loop.
Setting What it does
List Required. An expression that gives a list, for example data.documents.
Call each item The name the each path uses for the current item. Default: item.
Maximum items 1 to 100. Default: 20. Items past the limit are left out.
Run items sequential (default) or parallel.
At the same time For Parallel. 1 to 20. Default: 5.
If an item fails stop (default) fails the step. skip carries on without it. collect carries on and lists the failure in the results.
Store results as Saves a list of each item’s last result under data.<name>.
  • Inside the each path: the current item under the name you chose and as item, and its position as index (starting at 0).
  • After the loop: data.<name> when Store results as is set. With collect, a failed item appears as { "item": …, "error": "…" }. With skip, failed items are left out.
  • steps.<step id> holds the number of items handled.

If the List is not a list, the run fails. Every step inside the loop counts towards the run’s step limit, so keep loops within the maximum items you need.

When items run in parallel, each item keeps its own results while it runs. A Wait for event inside a parallel loop needs a correlation key, such as loanRef, so each item waits for its own event.

A lender reminds a borrower about each overdue instalment.

API / webhook → For each (input.dues, call each item due)
each → Send message (due reminder, amount = due.amount) → back to For each
done → End
{
"loanRef": "LN-88213",
"phone": "+919800000004",
"dues": [
{ "month": "2026-10", "amount": 12450 },
{ "month": "2026-11", "amount": 12450 }
]
}