Loops: process one item at a time
Use a loop when one step produces a list and the next step needs one item at a time. A list containing one file is still a list; it is not the same input type as a single File.
Understanding the basics
Section titled “Understanding the basics”For example, a message action can return several attachments. A document-translation action may accept one File. Loop over the attachment list and map the current loop item’s file, rather than trying to map the whole attachment array into that single-file input.
How to add a Loop?
Section titled “How to add a Loop?”- Open Add item on the flow line and choose Loop.
- Select the list output to iterate over.
- Name the loop for its items, such as For each attachment.
- Place per-item actions inside the loop and map the current item’s fields to them.
- Place work that should happen once after the loop’s end, outside the repeated path.
Search and category selection in Add item follow the same model as the editor reference. Use Bird Tasks to check missing configuration.
Keeping actions outside the Loop
Section titled “Keeping actions outside the Loop”To put three translated files into one new destination folder, create the folder before the loop and upload one file per iteration. Creating the folder inside the loop would create one folder per file. Keep its returned ID available to each upload step.
Collecting outputs
Section titled “Collecting outputs”Create an array variable before the loop. Each iteration updates it using both the existing array and the new result. Updating replaces the current value; forgetting the existing array keeps only the last result. Use the final variable after the loop. See the variable update guidance.
Check one item, then many
Section titled “Check one item, then many”Test a one-file list and a three-file list. Expect one result per item while the folder-creation step happens once. Open an iteration in the Flight to see its current item and mapped inputs.
Use Skip iteration when items are independent and the remaining work should continue after a failure. Record skipped items for follow-up. See error handling.