cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

autoreply from mailbox on specific days of the week and times

Hi,

 

I am trying to make a flow that on specific days of the week and time will send an autoreply

 

Example:

If mail is received on a Friday, 18:00 -> Reply with a message

if mail is received on Saturday/Sunday -> Reply with a message

if mail is received on Monday, before 6:00 -> Reply with a message

 

I am trying to achieve it with converting the 'received time' but i keep on failing.

 

Could anybody help here please ?

 

Regards.

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User II
Dual Super User II

Hi @Gwynbleid 

 

Please take a look at the flow below: 

Temaa.PNG

Expressions:

1. dayofweek(triggerBody()?['receivedDateTime'])
2. formatDateTime(triggerBody()?['receivedDateTime'],'hh:mm')
3. dayofweek(triggerBody()?['receivedDateTime'])
4. dayofweek(triggerBody()?['receivedDateTime'])
5. dayofweek(triggerBody()?['receivedDateTime'])
6. formatDateTime(triggerBody()?['receivedDateTime'],'hh:mm')

Carefully map the groups and it should work. Note that all this works on UTC time zone as the default recieved time is considered in UTC for Flow. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

5 REPLIES 5
Dual Super User II
Dual Super User II

Hi @Gwynbleid 

 

Please take a look at the flow below: 

Temaa.PNG

Expressions:

1. dayofweek(triggerBody()?['receivedDateTime'])
2. formatDateTime(triggerBody()?['receivedDateTime'],'hh:mm')
3. dayofweek(triggerBody()?['receivedDateTime'])
4. dayofweek(triggerBody()?['receivedDateTime'])
5. dayofweek(triggerBody()?['receivedDateTime'])
6. formatDateTime(triggerBody()?['receivedDateTime'],'hh:mm')

Carefully map the groups and it should work. Note that all this works on UTC time zone as the default recieved time is considered in UTC for Flow. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Super User III
Super User III

@Gwynbleid 

I agree with @yashag2255 but would like to suggest a solution that is a little different.  I believe the times you will be accessing from the email are in UTC.  Assuming that is the case, you'll need to convert to your time zone before your condition.

The expressions that I used are as follows:

dayOfWeek(body('Convert_time_zone'))
addHours(startOfDay(body('Convert_time_zone')),18)

addHours(startOfDay(body('Convert_time_zone')),6)

 

EmailDateTime.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Super User
Super User

The way I did it was slightly different, using just the Convert Time Zone action and  7 switches, 1 for each day of the week

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

DayofWeek_Flow.pngDayofWeek_Result.png

Hi,

 

Many thanks for your answer.

 

I managed to get the conditions without the hour working correctly. As its Wednesday ( 3rd day) I am trying to imitate the behaviour that would be happening on a Friday with following conditions and the path it takes despite 14 being set.

Conditions text was copy pasted from you. Right now the days conditions work well, but the time ones are failing.

 

 

autoreplyconditions.pngreceived.png

Hi,

 

I got it working after placing the expressions of the  hours in variables:

expressions.png

Expression:

formatDateTime(triggerBody()?['receivedDateTime'],'hh:mm')
Now I just need to adjust the less than part ( Monday Morning forexample) and it should be good
 
Cheers!

 

 

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (9,565)