Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Out of office reply at specific time of the week

(0) ShareShare
ReportReport
Posted on by

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.

  • efialttes Profile Picture
    14,756 on at
    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

  • Community Power Platform Member Profile Picture
    on at
    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. 

  • efialttes Profile Picture
    14,756 on at
    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! 

  • efialttes Profile Picture
    14,756 on at
    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

     

  • Community Power Platform Member Profile Picture
    on at
    Re: Out of office reply at specific time of the week

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

     

  • Community Power Platform Member Profile Picture
    on at
    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?

  • v-xida-msft Profile Picture
    on at
    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

  • efialttes Profile Picture
    14,756 on at
    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-in-2017-04-12T05-30-00Z/td-p/30226

    Hope this helps

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492