Skip to main content

Hi! 

I have an GSheet with the pipeline of prompts for chatGPT and they should be feed into the ChatGPT conversation after each other. For example of the simplified GSheet might look like this:

ID Prompt
prompt1 Calculate 1 + 1
prompt2 Add 5 to the result
prompt3 Multiply the result by 3

(oversimplification, there is a prompt engineering reason I need that this way)

 

So I’ve decided to use “Loop” by Zapier to loop through the prompt rows in the GSheet, in hope that the loop would wait for the answer from ChatGPT before it continues to the next step. After a few hours solving errors I’ve realized that the “Loop” is not waiting for the ChatGPT to finish it’s output and it right away continues to the next prompt and unsuccessfully tries to feed it into the ChatGPT conversation that is already running. The “loop” doesn’t behave like a loop but rather like a multithreading. Is this behavior intentional?

 

Please, do you have any ideas how to create a workaround for this? 

 

 

Hi @Vlado 

You will need to introduce a Delay For or Delay After Queue within the Loop.

https://zapier.com/help/create/customize/add-delays-to-zaps#delay-after-queue

 

Check this out:

 


Hey @Troy Tessalone, thank you for fast reply! With your tweet you gave me an idea not only how to solve the issue but even how to make the process cheaper.

There is one more issue that comes with it, each ChatGPT call is taking a different amount of time to generate the response and sometimes when it’s overloaded it may take even longer than expected. Because I have 20 steps in this loop, and I’d make delay for let’s say 5 minutes a single task that usually takes about 6 minutes would now take up to 1 hour and 42 minutes. Is there any way to make the loop continue only after ChatGPT process finishes, without guessing the time?


@Vlado

You’d have to configure the Zap different to create a chain reaction so that it runs asap. (basically webhook relay)

Check these out:

 


Reply