Skip to main content
Community site session details
Power Automate - Building Flows
Answered

Out-of-Office Auto Reply - for off hours and weekend

Like (0) ShareShare
ReportReport
Posted on 28 May 2019 13:10:01 by

Hey Im building a flow for an automated auto reply email - I have a domain condition(certain emails from specific domains) and then a time condition ( less then 9am and greater then 5pm )- below is an example of my flow. My problem is trying to implement days of week so saturday and sunday will auto reply regardless of hours while monday to friday will have the time received condition. Any help would be great. 

 

Capture.PNGCapture2.PNG

  • Verified answer
    yashag2255 Profile Picture
    24,635 Super User 2024 Season 1 on 28 May 2019 at 13:30:21
    Re: Out-of-Office Auto Reply - for off hours and weekend

    Hi @Anonymous , 

     

    Please follow the flow below and add the steps to the if condition in your flow. 

     

    outlook.pngExpression for the variable : 

    formatDateTime(utcNow(), 'dddd')

    This returns the day of the week. 

     

    Hope this Helps.

     

    Thanks, 

     

    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!

  • Verified answer
    yashag2255 Profile Picture
    24,635 Super User 2024 Season 1 on 28 May 2019 at 17:10:55
    Re: Out-of-Office Auto Reply - for off hours and weekend

    Hi @Anonymous , 

     

    1. In the weekend if statement, you should change it to Or instead of And (Not related to the time for weekdays but this will not work for weekend condition)

     

    2. You are directly comparing the "Recieved Time" field that is an unformatted time string with the hh:mm:ss type string so that is why it is throwing up an error. Follow the screenshot below and the steps to first format the time string and then compare. 

    flocal.png

     

    Formula for variable: formatDateTime(triggerBody()?['DateTimeReceived'], 'HH:mm')

    Hope this Helps. 

     

    Thanks, 

     

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete