Running Zapier Actions During Business Hours Only

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.

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.

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.

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.

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.

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

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.