Skip to content

Iterator Node

Module ID: ion.action.iterator

The Iterator node takes an array and outputs each item individually, enabling parallel or sequential processing of list data.


Use the Iterator node when you need to process each item in an array separately. Each item is emitted as a separate output, allowing downstream nodes to handle them independently.


HandleDescription
inputArray of items to iterate
HandleDescription
outputEach item from the array (emitted multiple times)
errorInput is not a valid array

The Iterator node requires no additional configuration. The array to iterate comes directly from the node’s data property.

// node.data is the array to iterate
node.data = [item1, item2, item3, ...]

  1. Receives array data
  2. Validates input is an array
  3. For each item in the array:
    • Emits the item to the output handle
  4. All items are processed before moving to next flow step
graph LR
A[Array Input] --> B[Iterator]
B -->|item 1| C[Process]
B -->|item 2| C
B -->|item 3| C
C --> D[Continue]

Input data:

{
"items": [
{ "sku": "ABC123", "quantity": 2 },
{ "sku": "DEF456", "quantity": 1 },
{ "sku": "GHI789", "quantity": 5 }
]
}

The Iterator outputs each item separately:

Output 1:

{ "sku": "ABC123", "quantity": 2 }

Output 2:

{ "sku": "DEF456", "quantity": 1 }

Output 3:

{ "sku": "GHI789", "quantity": 5 }

[Get Orders] → [Iterator] → [Update Inventory] → [Complete]
[Get Recipients] → [Iterator] → [Send Email] → [Log]

ErrorCause
”Error Unmarshalling to iterate”Input is string but not valid JSON array
”There is no data to iterate”Input is null, empty, or not an array