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?
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:
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.
Router. Route 1 set variable “Send Notifications” to TRUE only if within awake hours.
Router. Continue to Route 2
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.
Router. Route 1, send the notification only if “Send Notifications” was TRUE.
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.