Loop
The Loop node allows you to iterate over an array of items, executing a set of actions for each item in the list. This is useful when you want to process multiple records.
Last updated
Was this helpful?
The Loop node allows you to iterate over an array of items, executing a set of actions for each item in the list. This is useful when you want to process multiple records.
Last updated
Was this helpful?
What it does: The Loop node iterates over each item in an array and allows you to perform actions on each item individually. It acts like a "for-each" loop, repeating a specific section of your flow for every element in the list. All nested nodes inside the loop will run once per item.
When to use it? Use the Loop node when you need to apply the same logic or action to multiple items — such as sending emails to a list of users, transforming each object in an array, or posting data for every row in a spreadsheet. It’s essential when your automation involves batch processing or repeated steps based on a list of data.
The "Loop" node always includes 2 nodes:
Loop Over Items
Loop Output
Loop Over Items
Input
A JSON-formatted string that serves as the list of items to iterate over. Caution: Loop node supports up to 100 runs per session. If the data exceeds 100, it stops at the 100th run
Batch size
Number of items to process in each loop iteration (default is 1).
On Error when running loop
Defines error-handling behavior, choose between: - Skip and record error (default) - Stop workflow
Loop Output
Data to store
Select the variable or value to store from each loop iteration. The final output will be an array of these results.
The Loop component has no advanced configurations.
The Loop structure consists of two primary nodes: Loop Over Items and Loop Output.
Loop Over Items is the starting point of the loop. It takes a JSON-formatted string as input, where each element in the array represents an item that will be processed one at a time. This node controls how many times the loop will run based on the number of items in the input.
Caution: Loop node supports up to 100 runs per session. If data exceeds 100, it stops at the 100th run
Between the Loop Over Items and Loop Output, users can insert any processing nodes needed to handle the repeated logic, such as scraping content from websites, formatting JSON, calling AI models, or sending emails. Note that branching nodes (e.g., Branch
) are not supported within a loop.
The Loop Output node acts as the endpoint of the loop. In this node, you define which data from within the loop should be collected and returned after the loop completes. It allows referencing any node placed between Loop Over Items and Loop Output. Once selected, those outputs will be aggregated and shown in the Preview of the Loop Output node.
In the example shown above:
The Trigger node passes a list of article URLs in JSON format.
[ { "url": "https://www.theverge.com/2024/4/23/24078670/apple-may-product-event-ipad-date" }, { "url": "https://www.theverge.com/2024/4/23/24078670/apple-may-product-event-ipad-date" } ]
The Loop Over Items node iterates through each URL.
Inside the loop:
The JSON Formatter prepares the data structure.
The Web Scraper extracts the content from the given URL.
The Loop Output node is configured to store both the formatted URL and the scraped content.
The final Output node then shows the results of the looped operations in a structured format.
This structure allows you to repeat a defined sequence of operations over a list of inputs and collect the results in a single output for further use.