cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Out of office reply at specific time of the week

Hello everyone

 

I'm trying to build a Gmail Auto-reply flow that starts every Thursday at 5PM and ends Friday at midnight.

 

flow

 

This is what I have so far. All I could figure out was how to add Friday as a condition and I'm not sure it will work.

 

Can somebody hell me out?

 

Thanks.

8 REPLIES 8
Dual Super User
Dual Super User

Re: Out of office reply at specific time of the week

Hi!

Email trigger provides "Received Time" output, date+time the email was received. THis is at least in Outlook, I haven't tested gmail trigger yet. If not supported, you can apply utcnow() expression instead.

As soon as you get the date, you can convert date&time format. This thread provides valuable info about how to do it:

https://powerusers.microsoft.com/t5/General-Flow-Discussion/In-Microsoft-flow-how-to-get-the-utcnow-...

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Community Support Team
Community Support Team

Re: Out of office reply at specific time of the week

Hi @jobisamess,

 

I have made a test on my side and please take a try with the following workaround:11.JPG

Within Condition box, click “Edit in advanced mode” and type the following formula:

@equals(dayOfWeek(triggerBody()?['DateTimeReceived']), 5)

 

The flow works successfully as below:12.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Out of office reply at specific time of the week

I think the problem with your solution is that it would run only once and I want it to run every week. Am I correct?

Anonymous
Not applicable

Re: Out of office reply at specific time of the week

Would this work from Thursday at 5PM until Friday midnight?

 

Dual Super User
Dual Super User

Re: Out of office reply at specific time of the week

@Anonymous

"When a new email arrives" trigger runs everytime an email arrives to your gmail account. Once executed, the excellent flow example provided by @v-xida-msft evaluates the condition, and if match applies the corresponding action.

If I were you I would test it. Once te flow is declared and saved, you can inspect all its executions by going to the Flow Run History.

Hope it helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Dual Super User
Dual Super User

Re: Out of office reply at specific time of the week

@Anonymous

 

Date&time related functions are defined here

https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language#functions

There are also date&time related action blocks that have been recently released:

https://flow.microsoft.com/es-es/blog/nested-apply-to-each/

 

You can also manipulate date format. THere are several threads in this community with examples, one of the most recent ones is this one:

https://powerusers.microsoft.com/t5/Using-Flows/Automatically-delete-files-in-Document-Library-after...

 

Happy Flowing! 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Anonymous
Not applicable

Re: Out of office reply at specific time of the week

Yes, I understand how conditional actions work, thank you. What I'm not being able to figure out is how to make the condition be:

When new email arrives AND it's Thursday after 5pm until Friday 23:59 THEN send automated reply.

 

The part I'm having trouble with is Thursday after 5pm until Friday 23:59. I don't think it's possible to achieve this with the date format because it point to a specific point in time (29 of December 2017, for example), and I need it to have recurrence every week.

 

Can you just tell me if this is even possible to do in Microsoft flow? 

 

I'm just looking for an educated guess, so I don't have to read through pages and pages of documentation only to find that I wasted my time. That's all I'm asking for. Thank you. 

Dual Super User
Dual Super User

Re: Out of office reply at specific time of the week

@Anonymous

 

In order to verify that a time matches a certain time range, there is an excellent thread here explaining how to do it

https://powerusers.microsoft.com/t5/Using-Flows/Send-email-from-shared-inbox-during-after-hours-time-period/m-p/61642#M1847

 

For day of the week verification, @v-xida-msft has provided a very useful proposal

 

So, I guess you have to combine both verifications to have your flow up and running

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,982)