Forum Discussion
Yusuf
2 years agoActive Member II
Schedule action based canvas on weekdays only
Hi I have an action based canvas triggered by an event that I would like to send on weekdays only (Mon to Fri). Those that are eligible to get the send on a weekend, I would like the message to be de...
- 2 years ago
So you can in fact use the liquid and abort message, and then put a decision step of receiving message from previous step, then subsequent step of "Delay 2 days" then duplicate the message step. Let me know if you need some help as I've got that liquid code somewhere.
Yusuf
Active Member II
Hey I was also thinking along the same lines of using a blank web-hook message to determine weekday/weekend and abort message, followed up by a step to check if message was received from previous step. Yes please, if you do have the liquid code to determine weekend/weekday and abort message that would be really helpful.
Thank you!
BenLerner-Paio
2 years agoSpecialist
Hey Yusuf! Sorry I just saw this now. Here is a sample of something that could work:
{% assign allowed_days = "Monday, Tuesday, Wednesday, Thursday, Friday"}
{% assign current_day = "now" | date: "%d" %}
{% if allowed_days contains current_day %}
We're clear to send the message - add here!
{% else %}
{% abort_message("Sorry, its a weekend!") %}
{% endif %}
- Yusuf12 months agoActive Member II
Thanks, I managed to get this to work 🙂
Related Content
- 2 years ago
- 2 years ago