JSON to Variables to Loop to Google Sheets

If I have a JSON output from OpenAI like this :
“Your Name”: “Name”,
“Automation Title”: “Example Title”,
“Automation Description”: “Example Description”,
“Platform”: “ActivePieces”,
“Modules”: [

how can I do the following:

  1. Save the variables so that I can use them to add each item to a Google Sheet?
  2. Loop it as the output with the JSON will have multiple (more than 1 of the above) that all need to be added to Google Sheet in one run?

Hi @KyleBehrend

I’ve created this flow for you: Activepieces

It generates a JSON array with ChatGPT of the JSON object you posted. Since the generation is textual, I used a Code step to parse it into an actual JSON object. Then, I passed the array to a Loop step and I added a Google Sheets → Insert Row step to add some info from each of the items to a sheet.

1 Like

Thanks so much :slight_smile: I tried but the code block is blank - can you help? thanks :slight_smile:

Hello @KyleBehrend
here is the template with code https://cloud.activepieces.com/templates/wxOy2IlZX7c8WERkuHkm7