Process a list with a loop
In this tutorial, you will process each item in a list and return the collected results.1. Prepare the input
Create an Array block with several representative values, such as document names or request IDs. Connect it to the loop input.2. Add the loop
1
Create the loop body
Add the block or subflow that should run once for each item.
2
Use the current item
Connect the loop’s current-item output to the processing step.
3
Collect the result
Connect the processed value to the loop’s result collection.
4
Set a safe limit
Configure a maximum iteration count that matches the largest expected input. This prevents an unexpected condition from running indefinitely.
3. Test the loop
Run the workflow with:- An empty list
- One item
- Several valid items
- An invalid item in the middle of the list
- A list larger than the configured iteration limit
Loops or batching?
See Loops and Batching for detailed guidance.