Skip to content

Loop ​

Loop node for iterating over items, numbers, or text

Actions ​

Steps this node can perform. Add one from Add a step, then pick the action.

Loop Items ​

Loop through a collection of items

Settings

FieldTypeRequiredDescription
ValueListYesReference to a collection to loop through
Maximum IterationsNumberYesMaximum number of iterations
Default: 1000
Trim SpacesYes / NoWhether to trim spaces from the value
Default: true

Output

Later steps use this data by picking this step in the $ picker. For example, iterationCount is $.<step ID>.output.iterationCount.

json
{
  "iterationCount": 0,
  "currentItem": null,
  "currentIndex": 0,
  "isFirst": false,
  "isLast": false
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
iterationCountNumberThe number of iterations completed
currentItemAnyThe current item in the iteration
currentIndexNumberThe index of the current item
isFirstYes / NoWhether this is the first iteration (always true for first item)
isLastYes / NoWhether this is the last iteration for the current item

Loop from Numbers ​

Loop through a range of numbers

Settings

FieldTypeRequiredDescription
StartNumberYesStarting number
Default: 0
EndNumberYesEnding number
StepNumberYesStep size
Default: 1
Maximum IterationsNumberYesMaximum number of iterations
Default: 1000

Output

Later steps use this data by picking this step in the $ picker. For example, currentIndex is $.<step ID>.output.currentIndex.

json
{
  "currentIndex": 0,
  "currentValue": 0,
  "maxReached": false,
  "isFirst": false,
  "isLast": false,
  "isComplete": false
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
currentIndexNumberThe index of the current item
currentValueNumberThe current number in the iteration
maxReachedYes / NoWhether the maximum iteration count was reached
isFirstYes / NoWhether this is the first iteration (always true for first number)
isLastYes / NoWhether this is the last iteration for the first number
isCompleteYes / NoWhether the loop is complete

Loop Text ​

Loop through text character by character

Settings

FieldTypeRequiredDescription
ValueTextYesThe text to loop through
DelimiterTextThe delimiter to use to split the text
Trim SpacesYes / NoWhether to trim spaces from the text
Default: true
Maximum IterationsNumberYesMaximum number of iterations
Default: 1000

Output

Later steps use this data by picking this step in the $ picker. For example, iterationCount is $.<step ID>.output.iterationCount.

json
{
  "iterationCount": 0,
  "currentItem": "string",
  "currentIndex": 0,
  "isFirst": false,
  "isLast": false
}

Example values show the shape of the data, not real values. See Using data from earlier steps.

Field descriptions
FieldTypeDescription
iterationCountNumberThe number of iterations completed
currentItemTextThe current item in the iteration
currentIndexNumberThe index of the current item
isFirstYes / NoWhether this is the first iteration (always true for first item)
isLastYes / NoWhether this is the last iteration for the current item