Best answer

Need to collect data generated in a zap loop and use later in another zap

  • 24 October 2022
  • 3 replies
  • 116 views

Hello!

I have a multi-step looped zap that 

  1. gets a list of my clients
  2. then a loop starts
  3. gets the first one, looks for their info in a database
  4. use the info to post content on a specific app
  5. goes back to step 3 for the next member

This happens overnight. Now, what I need is to send an email hours later, during the day, to notify the member of the posted content.

Question: What’s the best way to achieve this without delaying the whole loop?

I thought using a sub-zap could be the answer, but a “Delay” step inside the sub-zap will delay the loop too, right? Because the main app awaits for the info from the sub-zap. Is that correct?

What about “digest”? (I have never used it).

Thank you,


Ern

icon

Best answer by robschmidt 24 October 2022, 04:47

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +9

Hi @ErnCosPLZ 

In this case, I’d suggest that you use Webhook by Zapier to setup the mailing logic to send during day.

In your loop zap, the end of the loop can be a Webhook Step that sends data to a #2 zap that you will need to create.

That #2 zap will have webhook trigger and receive data from your loop zap. Then the flow will look like this:

  1. Trigger: #2 Zap receives webhook data from loop zap
  2. Action: Setup logic via formatter/python if the day is after hours or before 9AM, pick the next day or today at like 10AM
  3. Action: Use Delay For action, and set the date-time from #2
  4. Your email action

 

Userlevel 4
Badge +7

Hey @ErnCosPLZ!  

I can confirm Rob’s idea is a very good one!  

Our Date/Time fields are special in that you can use English phrases which we will try to interpret.  You could use “Tomorrow at 10 AM ET”, for example, and we will generate an exact timestamp.  If your needs are such that something like that would work for you, you could just use the Delay by Zapier step to Delay Until something like that and skip the need for the 2nd step.

Anyways, let us know if we can help further and how things are going!

Hello @robschmidt,

Thank you very much for the idea of the webhooks, I hadn’t thought of that possibility (and thank you @RALaBarge for confirming). I will try it out as soon as I can and let you know how it goes.

Thanks again,

Ern.