blokboard/ Open app

Node reference

Iterate

Run once for every array item

CoreFlow

Iterate turns an array into separate executions. Use item for work that should happen for each value and done for work that should happen after all those paths finish.

Try it step by step#

  1. Create a Global named items containing ["Plan","Build","Review"].
  2. Set Items to {{global.items}}. Connect item to a Variable whose message is Complete: {{iterate.output.item}}. Use the scope shown in your expression picker.
  3. Connect done to a second Variable that reads the done output’s count. Run once and inspect both paths.

What to expect#

The item path runs three times. The done path runs once with count: 3. An empty array produces no item executions and a done count of 0.

Things to check#

  • Items must resolve to an array. Text that looks like an array is still text unless parsed.
  • The done output contains a count and the source input; it does not collect the results of the item path.

Keep learning#

Parameters#

SettingDefaultWhat it does
Items—Array to iterate. Leave empty to use the complete incoming value.

Inputs#

PortValueDescription
inarrayArray to iterate. If Items is empty, the entire input must be an array.

Outputs#

PortValueDescription
itemanyOne execution token for each item in the input array.
doneobjectEmitted after all item paths created by this iteration complete.

The item port can emit more than once. Each emitted value starts its connected path.

done fields#

FieldTypeDescription
countnumberNumber of iterated items.
sourceobjectOriginal source payload.

The done port waits for the descendant paths of item to finish.