FlowmageDocs

Repeats the steps you connect once for every item in a list.

Settings

SettingWhat it is
ItemsRequiredMust evaluate to a list — evaluated once, when the loop starts. Everything you connect to the loop's body output runs once per item and the chain ends where it stops; never connect it back to this node. Very large lists are capped per workspace: loop over IDs and read each record inside the body, or fetch the list in smaller batches (most services take a limit or page setting), instead of carrying the whole dataset through the loop.
CollectOptional. Read one value from each round — evaluated after the round ends, against that round — and the loop's done output lists them in order as collected. Name a step inside the loop, {{ node["Enrich"] }}, or one field of it, {{ node["Enrich"].total }}; for a loop inside this one, collect in that loop and name its list, {{ node["Inner"].collected }}. Secrets, files, schemas and json cannot be read here. The list is kept whole: if it grows past what one step's output may hold, the loop fails instead of cutting it short.
Read every pageRead every page of a list step that takes a cursor, like HubSpot — List records, or Table — Select returning its first rows: name its list as the items, {{ json.records }}, and the loop asks that step for the next page each time it runs out, until the list ends. Leave the step's own Fetch every page off. A step that cannot page is refused when you deploy.
Technical details
KeyValue
itemstextits `{{ }}` must give an array
collecttext
allPagestrue/false, by default false

Output

FieldType
itemCountnumber
completedCountnumber

More fields follow from the settings.

Sample output, and the expression for each field
  • completedCount3
  • itemCount3

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "allPages": false,
    "collect": "",
    "items": "<items>"
  },
  "label": "Loop",
  "type": "core.loop",
  "version": 3
}

Older versions

A flow that already has this version keeps running it. A new step always gets the newest.

Version 2
SettingWhat it is
ItemsRequiredMust evaluate to a list — evaluated once, when the loop starts. Everything you connect to the loop's body output runs once per item and the chain ends where it stops; never connect it back to this node. Very large lists are capped per workspace: loop over IDs and read each record inside the body, or fetch the list in smaller batches (most services take a limit or page setting), instead of carrying the whole dataset through the loop.
CollectOptional. Read one value from each round — evaluated after the round ends, against that round — and the loop's done output lists them in order as collected. Name a step inside the loop, {{ node["Enrich"] }}, or one field of it, {{ node["Enrich"].total }}; for a loop inside this one, collect in that loop and name its list, {{ node["Inner"].collected }}. Secrets, files, schemas and json cannot be read here. The list is kept whole: if it grows past what one step's output may hold, the loop fails instead of cutting it short.
Technical details
KeyValue
itemstextits `{{ }}` must give an array
collecttext
Version 1
SettingWhat it is
ItemsRequiredMust evaluate to a list — evaluated once, when the loop starts. Everything you connect to the loop's body output runs once per item and the chain ends where it stops; never connect it back to this node. Very large lists are capped per workspace: loop over IDs and read each record inside the body, or fetch the list in smaller batches (most services take a limit or page setting), instead of carrying the whole dataset through the loop.
Technical details
KeyValue
itemstextits `{{ }}` must give an array