cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gwynbleid
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
yashag2255
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
yashag2255
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!

ScottShearer
Super User
Super User

@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
RobElliott
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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,167)