I am trying to achieve the following (I am totally new to n8n):
Create a workflow that sends two slack messages first one at 8am, second one at 11am.
Approach:
1- Using Cron every hour.
2- Using a switch that calculate {{new Date().getHours()}}
3- if the value equals 8 flow will go to switch#0
4- if the value equals 11 flow will go to switch#1
Problem:
The expression doesn’t seem to work as I am not seeing any of the conditions are met, in the attached screenshot I did a test with 0, is this an expected behaviour? any workarounds?
If you want to do this in one workflow instead of having two workflows (one for the first message and one for the second on separate cron schedules), you can do something like this:
In short, it looks like you were pretty close This was me testing, with a message at 50 past and 52 past the hour. In your case, you’d need to switch the expression over to {{ DateTime.now().hour }}