Iterator Node
Iterator Node
Section titled “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.
Overview
Section titled “Overview”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.
Handles
Section titled “Handles”| Handle | Description |
|---|---|
input | Array of items to iterate |
Outputs
Section titled “Outputs”| Handle | Description |
|---|---|
output | Each item from the array (emitted multiple times) |
error | Input is not a valid array |
Configuration
Section titled “Configuration”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 iteratenode.data = [item1, item2, item3, ...]Behavior
Section titled “Behavior”- Receives array data
- Validates input is an array
- For each item in the array:
- Emits the item to the
outputhandle
- Emits the item to the
- 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]Example
Section titled “Example”Processing Order Items
Section titled “Processing Order Items”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 }Common Patterns
Section titled “Common Patterns”Process Each Order Line
Section titled “Process Each Order Line”[Get Orders] → [Iterator] → [Update Inventory] → [Complete]Send Multiple Notifications
Section titled “Send Multiple Notifications”[Get Recipients] → [Iterator] → [Send Email] → [Log]Error Cases
Section titled “Error Cases”| Error | Cause |
|---|---|
| ”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 |
See Also
Section titled “See Also”- Condition Node - For conditional branching
- Flow Nodes Overview