Hello Team,
I am trying to create a flow which sends email post working hours and during weekends. So my office hours are from Monday - Friday 1800 - 600 IST. Any email that comes after the working hours or during the weekend must get a customised message.
I tried a few following links which discussed on the same lines but I am finding no sucess. I am not saying the below examples are incorrect but it might be that I am not understanding/executing it correctly. Please guide
Example 1 - Email does not trigger
Example 2 - The expression is invalid
@or(equals(dayofweek(UtcNow()),0),equals(dayofweek(UtcNow()),6),less(formatDateTime(addHours(triggerBody()?['DateTimeReceived'],-6),'HH:mm'),formatDateTime('08:00:00','HH:mm')),greater(formatDateTime(addHours(triggerBody()?['DateTimeReceived'],-6),'HH:mm'),formatDateTime('17:00:00','HH:mm')))Example 3 - The expression is invalid
@and(less(formatDateTime(addHours(triggerBody()?['DateTimeReceived'],-6),'HH:mm'),formatDateTime('06:30:00','HH:mm')),greater(formatDateTime(addHours(triggerBody()?['DateTimeReceived'],-6),'HH:mm'),formatDateTime('17:30:00','HH:mm')))My attempts to trigger the mail by manually converting UTC time
@greater(substring(triggerBody()?['DateTimeReceived'],11,8), '00:00:00')
@and(greaterOrEquals(substring(triggerBody()?['DateTimeReceived'],11,8), '15:00:00'),lessOrEquals(substring(triggerBody()?['DateTimeReceived'],11,8), '16:00:00'))
@and(greaterOrEquals(substring(triggerBody()?['DateTimeReceived'],11,8), '15:00:00'),lessOrEquals(substring(triggerBody()?['DateTimeReceived'],11,8), '16:00:00'))
@and(greaterOrEquals(float(triggerBody()?['DateTimeReceived']), '15:00:00'),lessOrEquals(float(triggerBody()?['DateTimeReceived']), '17:00:00'))
Regards
Sam