Mastering Scenario Execution Based on Business Hours on Make.com

Hi there, Make.com users! Today, we're going to tackle a common challenge: configuring a scenario to execute based on business hours and outside business hours. Let's say your business hours are from 9am - 5pm, Monday - Friday. Anything outside of that is considered outside business hours. Sounds simple, right? But it can get a bit tricky when you're trying to set it up.

Problem

One of our users was trying to define the current day and time using tools. The output was correct, showing the current day and time. However, when they tried to set up the 'open' (business hours) filter, it wasn't accepting it. They tried different ways, but it kept passing every single time when it wasn't supposed to.

Solution

Here's the thing: you shouldn't be using a text variable at all to compare dates. Instead, you should compare a date type against another date type, or a numeric value against another numeric value. Also, you might be using formatDate to return too many portions of the date. Try reducing the format to output only the current hour, or day of week.

Under scheduling, you can set an advanced schedule to process the scenario. Just click the clock icon on the lower left of the first module/trigger, then click the 'Show advanced settings' toggle. This is a much easier way to set up your scenario.

If you want to do branching from a router, you don't even need to set a variable first. Just use 'now' directly, but make it return 'hour of day' and 'day of week' using a single date token. And don't forget to add a fallback route for anything outside your defined business hours.

Troubleshooting Tips

If you're still having trouble, remember to compare like with like. That means comparing date types with date types, or numeric values with numeric values. Also, make sure you're not using formatDate to return too many portions of the date. Keep it simple and only output the current hour or day of week.

Summary

Setting up a scenario to execute based on business hours and outside business hours can be a bit tricky, but it's definitely doable. Remember to compare like with like, keep your formatDate outputs simple, and use the advanced scheduling settings. And if you're doing branching from a router, you can use 'now' directly and add a fallback route for anything outside your defined business hours. Happy automating!

You do have further questions?

Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.