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.
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.