Skip to main content

Hey, this is my first post on the community so bear with me I’m still learning how to use Zapier.

Thank you so much for taking the time to read this I’ll get right into it to not waste anymore of your time. 

I’ve been building an automation where a user inputs and idea such as: Best Modular Sofas Online Shopping

Then I have my chat gpt generate a list of online stores related to this idea. So the output would be the list.

Now I have created a loop to separate each idea, incase the user inputs multiple ideas it is all divided into idea title 1 idea output 1, 2.. and so on

I’ve been having some issues trying to make a google doc for each idea so the user can access all the data easily. With the help of the ‘Copilot suggestions’ I was suggested to use Looping from Zapier (Create Loop from Line Items), but I ran into the issue when making the Values to Loop list since I don’t know how many ‘ideas’ the user will generate. So I went back to ‘Copilot Suggestions’ and now its been resending me this message over and over again: We'll set it up so that each idea's title and output are processed individually by looping through the list of ideas generated in step 4. This will ensure each idea is handled separately

 I want to figure out how to do this since ‘Copilot Suggestions’ hasn’t changed my Zap. How do I do this help please!
 

Hi ​@sdu 

Help us have more info by posting screenshots showing how your Zap steps are outlined and configured in EDIT mode with the field mappings visible.


Hey Troy!
I was just reading your Guides to see if I could find the solution! Thank you so much for your support! Very much appreciated!
This is how my Zap is looking: 
 

Here for example I tested with 3 possible ideas, but I don’t know how to program the zap to automatically be able to do all of the ideas the user might have (more than 3). Since the formatter was already dividing them I wanted one Google Document for each Idea Title and Detail to be created. How can I make this happen?


@sdu 

How is the Formatter Zap step configured? (screenshots from edit mode)

Try using one of these:

  • Formatter > Utilities > Text to Line Items
  • Formatter > Text > Split
    • Return as Line Items

Then use this Zap action: Looping - Create Loop from Line Items

 

 

Here’s perhaps a different approach to try…

Instruct ChatGPT to return the results in a JSON structure that you provide for consistent output and indicating it should be as an array of objects.

Use a Code step to parse the JSON into an array.

Then use this Zap action: Looping - Create Loop from Line Items

 


 


I am trying your suggestion of: 

  • Formatter > Utilities > Text to Line Items

But What do I input here: 

To be able to include the list of ideas generated in step 4 (from 1 - 500), allowing each idea to be processed individually. Without knowing how many ideas will be generated in step 4


@sdu 

Try setting the Segment Index as: All (as Line-Items)

 


Hey where can I find Segment Index?


@sdu 

Looks like you are trying to use named variables with the output from ChatGPT.

That results in separate fields, which won’t work for your use case, since there can be a varying # of data points returned.

 

 

Try this approach…

Instruct ChatGPT to return the results in a JSON structure that you provide for consistent output and indicating it should be as an array of objects.

TIP: You can ask ChatGPT to take your current output with named variables and convert that to a JSON structure for you to use in the ChatGPT prompt.

Use a Code step to parse the JSON into an array.

Then use this Zap action: Looping - Create Loop from Line Items

 


Thank you so much, I’ve been trying to figure out that article! I’ll keep trying, and keep you updated.

Thank you so much Troy! Really appreciate your help!


Hey so I’ve been testing it out, and it wasn’t quite clear to me in the article where to include this step, but I decided to take an educated guess and put it after the chat step. So it looks like:
 

Now I’m running into this issue: 

 


@sdu 

The ChatGPT reply variable is not structured as JSON.

You need to include instructions in the ChatGPT prompt to output the reply into a JSON structure you provide instead of using named variables.

See example below.

 

{
"ideas": s
{
"title": "Real Estate 101",
"details": "Get ready to decide"
},
{
"title": "Tricks of the Trade",
"details": "Thinking about a"
},
{
"title": "The Ultimate Guide",
"details": "XXX"
}
]
}

 


Hi there ​@sdu 👋

Did Troy’s last reply here help you to get things sorted? 

Let us know if you need any further help—happy to lend a hand if you’re still stuck at all! 🙂


Reply