Working with Lists
Most AI-FLOW nodes receive and emit single items. When you need to pass several items at once—multiple images, Strings, URLs, etc.—you can turn any compatible field into a list. Lists simplify your graphs, reduce node clutter, and unlock looping in subflows.
1. Turning a Field into a List
Example: Sending several images to a single GPT node.
Default (single-item) setup – add extra image fields and connect each to its own File Upload node.
List setup – convert the image field to a list, then connect one List node that outputs an array of files.
Comparison:
2. Iterating with Lists + Subflow Loops
Lists pair perfectly with Subflow Loop to run the same logic over every list element.
Scenario | Setup | What Happens |
---|---|---|
Single list (iterate over images) | Select image as the loop-over field. | The subflow runs once per image; the prompt stays constant. ![]() |
Parallel lists (images + prompts) | Provide two lists, choose image and prompt as loop-over fields. | On each iteration the node receives image [i] and prompt [i]. ![]() |
Result preview:
Tip: Two nodes—one List and one Subflow Loop—often replace half a dozen manual connections.
3. Nodes That Return Lists
These nodes can output arrays directly, making chaining easy:
- Subflow Loop (collects iteration results)
- Data Splitter
- Regex Extract
- JSON Tools and List Tools
- Google Search
4. When a Field Doesn’t Accept Lists
If you feed a list into a field that expects a single item:
- AI-FLOW serialises the list to plain text (JSON).
- The receiving node may throw a type error (e.g., if it needs a file URL) or just treat the text literally.
5. Lists Are JSON Under the Hood
Every list travels through the graph as standard JSON. Leverage JSON Tools to:
["image1.png", "image2.png", "image3.png"]
- filter, map, or reduce elements
- merge or split arrays
- transform structures for downstream nodes
Key Takeaways
- Convert, don’t duplicate. One list field is cleaner than many single-item fields.
- Loop smart. Combine List nodes with Subflow Loop for effortless iteration.
- Mind compatibility. Pass lists only to fields that understand them.
Use lists well, and your AI-FLOW pipelines stay compact, readable, and scalable.
Additional Resources
For more advanced configurations and detailed guidance, refer to the following resources: