When to use
- Process arrays of records from NetSuite or SAP
- Fetch paginated API results until all data is retrieved
- Create multiple records in bulk operations
- Execute operations a specific number of times
Actions
Fixed Iteration
Fixed Iteration
Runs the loop a specified number of times regardless of input data.Parameters:
Access iteration number:
| Field | Required | Description |
|---|---|---|
| Number of iteration counts | Yes | Number of times to execute the loop |
| Output Data | No | Data to collect from each iteration using node variables |
| Concurrent Batches | No | Iterations to run in parallel (e.g., 10 total with 3 concurrent runs as 3,3,3,1). Default: 50, max: 100 |
{{loop.iteration_number}}Array Iteration
Array Iteration
Runs the loop once for each element in the provided array.Parameters:
Access current element:
| Field | Required | Description |
|---|---|---|
| Fanout Array | Yes | Array to iterate over. Each element available as {{array_item}} |
| Output Data | No | Data to collect from each iteration (e.g., {{process_contact.result}} or {{array_item.id}}) |
| Concurrent Batches | No | Array elements to process in parallel. Default: 50, max: 100 |
{{array_item}} or {{array_item.property}}Do While
Do While
Continues looping while conditions are met and stops when break conditions are satisfied.Parameters:
Access iteration count:
| Field | Required | Description |
|---|---|---|
| While Condition Rule | No | Match logic for the while conditions: Match All Conditions (AND) or Match Any Condition (OR) |
| While Condition | No | Conditions under which the loop continues executing. Click + Add Condition to add rules |
| Break Condition | No | Conditions under which the loop stops executing. Click + Add Break Case to define exit rules |
| Output Data | No | Data to collect from each iteration into the loop node’s output array |
Define a While Condition, a Break Condition, or both — otherwise the loop has no way to stop.
{{loop.iteration_count}}Custom output
All action types support Custom Output to define additional output fields. Click + Add Field to capture specific data from loop execution.Failed iterations do not stop the loop. Remaining iterations continue executing.
The maximum number of batches per instance is 10,000 (including nested batches). Concurrent batches default to 50 and are capped at 100.
Output
Returns an array of results collected from each iteration.Adding to your workflow
Configure parameters
Set iteration count, fanout array, or loop/break conditions based on action type.
Examples
Array Iteration: Process NetSuite Contact IDs
Array Iteration: Process NetSuite Contact IDs
Fetch full contact details for each ID returned from a NetSuite query.Fanout Array: Inside Loop: NetSuite Node with
{{netsuite_contacts.records}}Get Contact by ID using {{array_item.id}}Output Data: {{get_contact.body}}Result:Do While: Fetch Paginated SAP Vendor Data
Do While: Fetch Paginated SAP Vendor Data
Continue fetching vendor records until all pages are retrieved.Loop Condition (AND):
Break Conditions:
Inside Loop: HTTP node calling SAP API with pagination tokenResult:
| Variable | Operator | Value |
|---|---|---|
{{fetch_vendors.hasMore}} | Equal To | true |
| Variable | Operator | Value |
|---|---|---|
{{fetch_vendors.nextPageToken}} | Is Null | - |
Fixed Iteration: Create Test Records
Fixed Iteration: Create Test Records
Create 5 test invoice records in Tipalti for sandbox testing.Configuration:
- Number of iteration counts:
5 - Concurrent Batches:
2 - Inside Loop: Tipalti node with
Create InvoiceusingTest Invoice {{loop.iteration_number}} - Output Data:
{{create_invoice.id}}
Troubleshooting
Loop never stops (Do While)
Loop never stops (Do While)
Problem: Loop continues indefinitely without reaching break condition.Solutions:
- Verify break condition variables are updated inside the loop
- Add a Custom Code node to inspect condition values during execution
- Implement fallback break condition based on iteration count
High failure rate with concurrent batches
High failure rate with concurrent batches
Problem: Many iterations fail when running in parallel.Solutions:
- Reduce concurrent batch size to avoid API rate limiting
- Add Delay node inside loop between API calls
- Check external system capacity for concurrent requests
Cannot access array element properties
Cannot access array element properties
Problem: Variable syntax errors when accessing array items.Solutions:
- Use correct syntax:
{{array_item.property_name}} - Verify array elements contain expected properties
- Use Custom Code node to inspect
{{array_item}}structure
Output data empty or missing
Output data empty or missing
Problem: Loop completes but no results collected.Solutions:
- Verify output data references valid node outputs inside the loop
- Check that referenced nodes complete successfully
- Test output expression with single iteration first
Next steps
Tables node
Store loop results for use outside the loop.
Rule node
Add conditional logic within loops.
Custom Code node
Process complex data per iteration.