Skip to main content
Best answer

Looping by Zapier run steps sequentially.

  • October 27, 2022
  • 7 replies
  • 1009 views

Forum|alt.badge.img

So I just realized that Zap run in parallel rather than sequentially. I tried Delay after Queue, however, this doesn’t seem to guarantee that steps run one after another especially since I am using Storage by Zapier to share data between steps. Is there any way to set this up or is this not possible with Zapier?

Best answer by MohSwellamBest answer by MohSwellam

Hi @arkhamknighthell 

 

Maybe you should try Digest by Zapier instead of Storage by Zapier? 

 

Also, what do you mean by exiting the loop? The loop works on the steps after it. From what I can see there is no way to create a separate step after the Loop. 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

nicksimard
Forum|alt.badge.img+11
  • Zapier Staff
  • 2115 replies
  • October 28, 2022

Hi @arkhamknighthell!

That’s a tricky one. Can you elaborate a bit on the setup? What are you running through that Zap? That could help us see if there’s some sort of workaround or workflow that could solve your problem.

Thanks!


Forum|alt.badge.img


Hello @nicksimard,

Yes I’ve noticed that this can be tricky. Basically what I am trying to do is run python in each loop (due to API limitations I can only grab partial results). Then using storage by Zapier accumulate the results from the output of the API call. After that I exit the loop grab all of the results and take an average of them. I can’t internally run a for loop on the single python step due to the timeout of 10 seconds after 2 or 3 API calls. The problem isn’t running them parallel that would be fine if all the loops could all send their results so I could combine them at the end.

 


MohSwellam
Forum|alt.badge.img+8
  • Zapier Expert
  • 840 replies
  • Answer
  • November 1, 2022

Hi @arkhamknighthell 

 

Maybe you should try Digest by Zapier instead of Storage by Zapier? 

 

Also, what do you mean by exiting the loop? The loop works on the steps after it. From what I can see there is no way to create a separate step after the Loop. 


Forum|alt.badge.img

@MohSwellam 

I was referring to the loop_iteration_is_last item which I can filter and only runs the subsequents steps after the last loop according to https://help.zapier.com/hc/en-us/articles/8496106701453-Loop-your-Zap-actions#frequently-asked-questions-0-4.


MohSwellam
Forum|alt.badge.img+8
  • Zapier Expert
  • 840 replies
  • November 1, 2022

Thanks for the update @arkhamknighthell . But in this case this step is not being triggered for all the loops so how is the script running or how is the Storage working? What are the steps exactly? 

 

Maybe sue a Webhook to end the zap on the last iteration and another Webhooks to start a new zap that has the storage? Just an idea


Forum|alt.badge.img+7
  • Zapier Staff
  • 102 replies
  • November 2, 2022

Hey @arkhamknighthell, I just wanted to toss in an idea -- What about Delay by Zapier using the “Delay by Queue” action?  If you put that in the loop, even if the runs are parallel, they are still not “truly parallel” if you will with regards to how quickly all of the actions will run.  Since it is on the order of milliseconds, to us it is “instant” but Zapier will process each individually as soon as a worker grabs that request and process’ it.  This means that there will be some sort of sequential nature to this since they won't all run at the exact same time in parallel by a single computer.  It might be something neat to try to see if it helps but it could also introduce other issues as well.


Forum|alt.badge.img

@MohSwellam 

Actually digest by Zapier did the trick, there are other issues, but have nothing to do with looping. As for Delay By Queue, I’ll have to try adding it at the end of the queue.