# Running Zapier Actions During Business Hours Only

- Link: https://cagrimmett.com/2017/04/25/running-zapier-actions-during-business-hours-only/
- Published: 2017-04-25T21:43:23-04:00
- Author: Chuck Grimmett

![](https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2ADM9CYduM7KTBQBGYs9ZCZA.
png?ssl=1)

Two weeks ago I had a problem I wanted to solve with Zapier: Only running a particular
Zapier action during business hours and delaying everything that happens outside
of business hours until the next day.

I tried multiple approaches to make this happen, but each one fell short:

 * Filtering up front for business hours meant that everything outside of business
   hours stopped due to Zapier’s Continue Only If filter.
 * Only checking that the time was before 5pm meant that zaps could go through at
   2am.
 * Only checking that the time was after 8am meant that zaps could go through at
   11pm.

Zapier is really great at handling linear workflows (if X happens, then do Y), but
it isn’t really set up to handle nested workflows (if A, then 1, else if B, then
2, else if C, then 3). In order to correctly handle only running zaps during business
hours, individual zaps would need to have nested logic. This is unlikely to happen
on Zapier any time soon, so I thought I was out of luck.

After thinking about it for a few days, it hit me: **Why not use two different zaps
simultaneously**? As long as the zaps are configured in a way that one always works
and the other one always gets filtered so they never conflict and duplicate actions,
it can work! Yes, this doubles your zap usage, but it is a great way to get around
not having nested logic in individual zaps.

By combining the Date/Time formatter, Only continue if… filter, and the Delay Until
action with different settings in two different zaps, I achieved what I wanted.

![](https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2AwX7SVnEgT7Tle6VS5P9qMw.
png?ssl=1)

Here is a sketch of the solution I’m using:

### Zap 1: Handling actions between 00:00 and 17:00

After the trigger (a form submission), I immediately set up three actions:

 1. Zapier Formatter’s Date and Time Formatter to get the time the zap triggered and
    transform it to a usable format in my time zone.

![](https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2ACmIAXoJjSUjarM5BHjOJ5w.
png?ssl=1)

2. Zapier’s Only Continue If filter to check the time of the previous step and only
allow it to continue if the time is _before_ 17:00. Anything that happens after 
17:00 gets to this point in the zap and stops.

![](https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2A6xOWlrNgknKXTZ15V2KiIQ.
png?ssl=1)

3. Zapier’s Delay Until action to delay actions until 08:00.

The way that the Delay Until action works is that if the time is before your specified
time, the action will be delayed until the time you specified. If the current time
is after the time you specified, the action will continue immediately. Understanding
this ended up being the key to this workflow design.

![](https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2AeJombcHtbNtEV-VLVfozUA.
png?ssl=1)

Everything else I want to occur during business hours comes after this step in the
zap.

### Zap 2: Handling actions between 17:00 and 23:59

For 17:00 through 23:59, I use the same three actions and filters, but with different
settings.

 1. Zapier Formatter’s Date and Time Formatter to get the time the zap triggered and
    transform it to a usable format in my current time zone.
 2. Zapier’s Only Continue If filter to check the time of the previous step and only
    allow it to continue if the time is _after_ 17:00. Anything that happens before
    17:00 gets to this point in the zap and stops.

![](https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2AMq7kY-HE2tLzLQpS3gwF-A.
png?ssl=1)

3. Zapier’s Delay Until action to delay all further actions until 08:00 the following
day.

![](https://i0.wp.com/cdn-images-1.medium.com/max/800/1%2APYSUc7uNYkA7TGc_IqXcJg.
png?ssl=1)

### Here’s how it works

Both zaps get triggered from the same form submission. The way we’ve set them up,
one of the two zaps will always run and the other will always get filtered out by
the “Only continue if…” step. Our cutoff point is 17:00. Whatever happens before
17:00 gets handled by Zap 1 and Zap 2 gets filtered. Whatever happens after 17:00
gets handled by Zap 2 and Zap 1 gets filtered.

#### Examples:

 * Form submission at 3:21am: Zap 1 kicks in and delays the action until 8am. Zap
   2 gets filtered and does not run.
 * Form submission at 8:41am: Zap 1 runs immediately because it is before 17:00,
   but after 8am, the Delay Until time. Zap 2 gets filtered and does not run.
 * Form submission at 2:15pm: Zap 1 runs immediately because it is before 17:00,
   but after 8am, the Delay Until time. Zap 2 gets filtered and does not run.
 * Form submission at 6:08pm: Zap 1 gets filtered and does not run. Zap 2 kicks 
   in and delays the action until 8am the next day.
 * Form submission at 11:52pm: Zap 1 gets filtered and does not run. Zap 2 kicks
   in and delays the action until 8am the next day.
 * Form submission at 12:02am: Since it is now a new calendar day, Zap 1 kicks in
   again and delays the action until 8am. Zap 2 gets filtered and does not run.

## Comments

### By: DJ Hollywood J

- Link: https://cagrimmett.com/2017/04/25/running-zapier-actions-during-business-hours-only/#comment-24952
- Published: 2022-09-20T23:05:17-04:00

It is amazing how long it took me to find the solution to this – a well-written 
post from 2017 was exactly what I needed! Chuck, thank you! My automations are working
exactly as intended now.

Loading...

### By: What is Zapier? 8 Surprising Ways It Can Save You Hours Every Week!

- Link: https://cagrimmett.com/2017/04/25/running-zapier-actions-during-business-hours-only/#comment-40284
- Published: 2024-08-14T06:02:09-04:00

\[…\] processes tasks at intervals, meaning there’s sometimes a delay between when
a trigger event occurs and when the action is executed. This latency can be a drawback\[…\]

Loading...
