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
| Field | Type | Required | Description |
|---|---|---|---|
| Value | List | Yes | Reference to a collection to loop through |
| Maximum Iterations | Number | Yes | Maximum number of iterations Default: 1000 |
| Trim Spaces | Yes / No | Whether 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.
{
"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
| Field | Type | Description |
|---|---|---|
iterationCount | Number | The number of iterations completed |
currentItem | Any | The current item in the iteration |
currentIndex | Number | The index of the current item |
isFirst | Yes / No | Whether this is the first iteration (always true for first item) |
isLast | Yes / No | Whether this is the last iteration for the current item |
Loop from Numbers
Loop through a range of numbers
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Start | Number | Yes | Starting number Default: 0 |
| End | Number | Yes | Ending number |
| Step | Number | Yes | Step size Default: 1 |
| Maximum Iterations | Number | Yes | Maximum 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.
{
"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
| Field | Type | Description |
|---|---|---|
currentIndex | Number | The index of the current item |
currentValue | Number | The current number in the iteration |
maxReached | Yes / No | Whether the maximum iteration count was reached |
isFirst | Yes / No | Whether this is the first iteration (always true for first number) |
isLast | Yes / No | Whether this is the last iteration for the first number |
isComplete | Yes / No | Whether the loop is complete |
Loop Text
Loop through text character by character
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Value | Text | Yes | The text to loop through |
| Delimiter | Text | The delimiter to use to split the text | |
| Trim Spaces | Yes / No | Whether to trim spaces from the text Default: true | |
| Maximum Iterations | Number | Yes | Maximum 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.
{
"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
| Field | Type | Description |
|---|---|---|
iterationCount | Number | The number of iterations completed |
currentItem | Text | The current item in the iteration |
currentIndex | Number | The index of the current item |
isFirst | Yes / No | Whether this is the first iteration (always true for first item) |
isLast | Yes / No | Whether this is the last iteration for the current item |