Run scenario immediately on schedule

Hi there,

I’m tracking something with a webhook, but would like not to get notifications during sleeping hours.
I am not sure how to do it.
I found a topic with this exact same need (but it’s locked): Have a scenario run immediately, but on a schedule

A solution is suggested but I’m too noob to do it. Could someone be nice enough to give an example I could adapt to my need?

TIA!

hi @B11

you can schedule this like this :

-first click here
image

A webhook trigger is going to start the scenario immediately when it’s triggered.
I think you’re only option here is to use a filter to suppress any notifications based on time of day, like the post you’ve linked mentioned.

There are many ways to implement this, here’s one:

I would use a router before your notification module, put the notification on its own separate route, only take that route when it’s within awake hours, then proceed with the rest of the scenario on the second route.
Something like this:

The first route goes to Twilio Send a Message but only during awake hours.
The second route (the rest of the scenario) is always taken.

Here’s one way to set up “Awake Hours” filter:

This checks two conditions:

  1. That the time right now is later than or equal to today’s date, 6 AM.
  2. The the time right now is earlier than or equal to today’s date, 9 PM.
3 Likes

If you’ll have several notifications then it might be easier to use some variables at the beginning of the scenario then use routers and filters throughout the scenario to check the variables.

Here, this is:

  1. Webhook
  2. Set awake hours
  3. Router. Route 1 set variable “Send Notifications” to TRUE only if within awake hours.
  4. Router. Continue to Route 2
  5. Get Send Notifications - Get the “Send Notifications” variable. Will be TRUE if route 1 was taken. Will be blank if Route 1 was never taken.
  6. Router. Route 1, send the notification only if “Send Notifications” was TRUE.
  7. Route 2, the rest of the scenario

Each time in your scenario that it’s time to send a notification of some sort, you’ll intercept that module with a router and filter on that route that only allows that route to run when “Send Notifications” is true.

Here is a blueprint for you to check out if you’d like:
AwakeHours.json (15.8 KB)

1 Like

It works perfectly. Thank you so much.

I really appreciate you took time to do screenshot and everything.

I hope it’ll also help some people in the future.

1 Like

This is an easy way but I think it doesn’t work because Webhook has to be set to immediate delivery