cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Gwynbleid
Level: Powered On

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
Dual Super User

Re: autoreply from mailbox on specific days of the week and times

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
Dual Super User

Re: autoreply from mailbox on specific days of the week and times

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
Super User

Re: autoreply from mailbox on specific days of the week and times

@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

Re: autoreply from mailbox on specific days of the week and times

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

Gwynbleid
Level: Powered On

Re: autoreply from mailbox on specific days of the week and times

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

Gwynbleid
Level: Powered On

Re: autoreply from mailbox on specific days of the week and times

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
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (3,894)