How to get "Structured AI Output" to multiple rows in a Google sheet?
Status: Closed · Asked by Bjarne Eldhuset on · 0 views

Hello Bjarne,
Thanks for reaching out. To loop a structured JSON array AI output into separate rows in Google Sheets, the key is to have the data in a proper JSON array so it can be processed one item at a time.
Here’s the approach:
Make sure the ChatGPT step returns your 25 records as a single JSON array of objects, with each object containing the 15 column values. Your JSON schema should define an array of items rather than 375 individual fields.
Add an Iterator step after the ChatGPT action and point it to that array. The Iterator will loop through each item, so you don't have to map 375 fields manually—you only need to map one item's fields once.
Add a Google Sheets "Add New Row" action after the Iterator and map the data from the Iterator to the Google Sheets action step. The Iterator will run this step once per record, creating 25 rows.