Skip to main content

Hi everyone! 

Leo here from Zapier Support, hope you're doing well today!

Occassionally, we get a question whether it’s possible to make a Zap work between certain hours and certain days, otherwise delay.

There are a couple of options available, but when it gets complex, it will often involve using Paths by Zapier. Now, we know that not everyone needs a Pro plan (or higher), so we set out for a fun challenge to create a Zap that can do the following, without using Paths, in the leanest way possible:

1/ Allow the Zap to continue, if the Zap is triggered between Monday and Saturday, 8 AM and 6 PM
2/ Before 8 AM on Mondays to Saturdays > delay until 8 AM today
3/ After 6 PM on Mondays to Fridays > Delay until 8 AM the next day
4/ After 6 PM on Saturday, or the entire Sunday > Delay until next Monday

The Solution:

Trigger: use the trigger of your liking

Action: Formatter > Date / Time > Format.
Use input: {{zap_meta_human_now}}
Output: custom value: ddd HH

Action: Lookup Row in Google Sheets
Search column A by output of step 2

Action: Delay by Zapier > Delay Until
Use custom value > output step 3

Action: use the action of your liking

The Google Sheet you’ll want to make a copy of and add to your Google Drive is found here: http://zpr.io/t5HZv


The spreadsheet has 169 rows (7 days x 24 hours + 1 row header) to see if a certain timestamp can run immediately, the next morning or next Monday. I have tried creating a sheet which is easier to modify (different hours) . For instance, if you want to run this Zap on Mondays to Fridays, same hours, you can change cells J5, K3, K4 and K5 to “Next Monday at 8 AM”.

Additionally, if you start earlier or later, you can change the 8 AM in all the colored cells to update column B automatically.

The only thing that can’t be automagically updated is the ending time. If you want to run this Zap between 8 AM and 4 PM, you’ll then need to update a couple or rows in Column B manually.

To make it a little easier, here’s a link to a Shared Zap to get this working: https://zapier.com/shared/da3d5d8901eea481002e0d6429dff1628bd7e6f4

 

How to get this working:

  1. You’ll first want to make a copy of the Google Sheet in your Google Drive. Sheet: http://zpr.io/t5HZv (click here for instructions on how to do that)
  2. Use the Shared link from above to make a copy of this template in your Zapier account
  3. Change the trigger to your liking
  4. Use the below extra details if you like
  5. Change the action step and add additional ones if needed


Some steps explained:

A/ Date formatting

As you can see in this screenshot, we’re changing the date time to ddd HH, so we can use that to look up how much the Zap will need to be delayed (if any).

B/ Lookup row

In this screenshot, you can see that we look up a row with the output from the date formatting step. This will allow us to retrieve the value to delay until for.

C/ Delay Until

With the result of the lookup-row step, we’ll be able to dynamically input the value for a delay until as a custom value, you can see that here.

You might wonder, what if my Zap runs on Monday 2 PM. According to the table, it will run at 8 AM, which is in the past. What will happen? Because of this setting, we can handle “past” events, up to 24 hours ago, which is well in our range.

 

Afterthoughts:

  • It’s definitely possible to use a Formatter > Utilities > Lookup table instead of the Google Sheets step, but the data entry can take… a while
  • Perhaps the date formatting and the lookup can be combined in one step by using Code by Zapier, but I’ll leave that challenge to you ;) 

I hope this will make it a little easier to get this working.

Cheers,

 

Screenshot: https://www.screencast.com/t/XYaU7Ar1

I am stuck at step3. Find how much to "Delay Until" for

Please guide me what to select here


Hi @mahesh,

You should be able to find the configuration for the lookup row step here (I took this screenshot from the instructions just above):

 

 


If we have a Pro plan do you recommend Paths by Zapier. and if so can you share steps to make this happen? Or is it best to use the steps above?


Hi @DanB, it is possible to do this with Paths by Zapier, but it can become a little complicated in setting this up. You will also need to convert the current date and time to ddd HH and then use conditions like:

If ddd HH contains Mon, Tue, etc AND HH number is greater than and HH number is lesser than, you can make this work with Paths by Zapier.

Personally, I like the above version much better as it uses less tasks each time the Zap runs and you can customize it quite easily should business hours change and/or if you have different operating days.

Cheers 🙂


@Lionel_Selie  LEO! You ROCK!! 


@Lionel_Selie The shared zap is no longer active 😞 Would you be able to reup it or take a screenshot of the needed steps? Thanks for this!


Hi @Rebongalong —thanks for notifying me!

I created a new shared Zap, which can be accessed here: https://zapier.com/shared/da3d5d8901eea481002e0d6429dff1628bd7e6f4. The post has also been updated with the new link.

When using the shared Zap, you’ll want to change your trigger and replace the Webhook step with whatever action step or steps you’d like to use.

Hope that helps!


Hi Leo, Is it possible to use this shared zap as a subzap to insert into zaps already created? How would we do that? Thanks for this! This is super helpful!


Hi @ko198 

 

No you cannot do that automatic, you need then to recreate the steps into your existing zap.


Hi Leo, Is it possible to use this shared zap as a subzap to insert into zaps already created? How would we do that? Thanks for this! This is super helpful!

Hi there!

If you are switching the trigger and last action step out for a Start a Sub-Zap and Return From a Sub-Zap steps, that should work.

If you run into hurdles, we’re happy to help: https://zapier.com/app/get-help


hello @Lionel_Selie I do the job to test your tuto. I have some question :

1- the zap will run ever minute ? (for the moment - to test i’m on the free plan)
2- to test the run of this zap every day, all the day, i connect slack. It is a goog idea ? because for the moment i do not receive slack message. Is there something wrong ?

Thanks


Hi @Thetys 😁

The provided solution is something you add as a set of actions, to dynamically delay (or not) certain actions. The trigger you’ll need to specify. Some triggers trigger instantly, others can take up to 15m, depending on your plan.

Not sure what the second issue is, but basically if you use the workaround, you’ll delay a particular action, based on how you’ve set up the configuration.

If you are on a trial plan, you should be able to get help via chat or email: https://zapier.com/app/get-help. That said, if you plan on using this, a paid plan will be needed (or an active trial), so I would recommend reviewing it, and see if it’ll provide enough value for you to upgrade.

Hope this helps!


Reply