Processing multiple files

Hey,

I have a super simple flow setup to read financial statements and turned them into structured data in a google sheet. It doest this by using the analyse image node.

The problem I am stuck on is how to make it loop through. Google Sheet doesn’t appear to have a loop mode function. And turning on loop mode in analyse image and extract data creates a list of list error for the google sheets.

How can I fix this?

workbook linked here: Gumloop | Automation Builder

Hey @ZaidLyfe,

This issue happens because when you process multiple files, the Analyze Image & Extract Data node extracts data from each file and outputs a list of lists. The Google Sheets node doesn’t support nested lists; it can only write a flat list of rows.

The correct way to handle this is by using Subflows. Instead of extracting all files in a single pass, you should separate the logic so that each file is processed independently. Your main flow should iterate over the files and pass them one at a time into a Subflow.

Inside the Subflow, you analyze the image, extract the structured data, and immediately write the result to Google Sheets. Since the Subflow runs in loop mode, each iteration produces a single, valid row (or set of rows), which avoids the list-of-lists error entirely.

Here’s an updated workflow showing this setup for reference: https://www.gumloop.com/pipeline?workbook_id=43pWKi3DCDhmUFED8VrfKS

You can also find more details on how Subflows work here: https://docs.gumloop.com/core-concepts/subflows

Let me know if you have any questions.