Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Detecting Out of Office issue

(0) ShareShare
ReportReport
Posted on by 8

Hello All,

I am building an approval flow that checks to see if the manager is OOO and actions differently depending on the result.  Currently my flow is set up as shown below.  It works perfectly except some managers are returning as OOO when they are actually IN office.  That appears to be because the response from mail tips is

{,

     "automaticReplies": {

         "message": ""

}     

 

Flow works fine if response is

 

{,

     "automaticReplies": ""

}

 

What is causing the "message" to show and how can I account for it?

FlowPic.jpg

  • gorowe76 Profile Picture
    8 on at
    Re: Detecting Out of Office issue

    I tried your solutions but for whatever reason it was failing.  Thank you very much for your suggestions, it is very much appreciated.

  • gorowe76 Profile Picture
    8 on at
    Re: Detecting Out of Office issue

    Thank you Levi, this worked.

  • David- Profile Picture
    1,254 on at
    Re: Detecting Out of Office issue

    Which value are you using to set the OOO String variable?

    Web capture_16-9-2022_8618_make.powerautomate.com.jpeg

    You want to use the Automatic replies message. If no message is set, it will be null.

  • Verified answer
    v-liwei-msft Profile Picture
    on at
    Re: Detecting Out of Office issue

    Hi @gorowe76 

     

    I suggest you to use this formula:

    empty(items('Apply_to_each')?['automaticReplies']?['message'])

    I have made a test for your reference:

    vliweimsft_0-1663312359527.png

    vliweimsft_1-1663312370589.png

    I think this link will help you a lot:

    Solved: Check if the automaticReplies is equals to null - Power Platform Community (microsoft.com)

    Tip #1388: Check if someone is out | Power Platform & Dynamics CRM Tip Of The Day

     

    Best Regards,

    Levi

     

  • gorowe76 Profile Picture
    8 on at
    Re: Detecting Out of Office issue

    David,

    Thank you for the suggestion, I did try it but I am still getting the supervisor showing as OOO.  The output of the variable for her shows as below.  The logic is working because the length is greater than "0" but why is she the only one - that I can tell - that has this "message":" " and how do I account for it?

     

    flowoutputs.jpg

  • David- Profile Picture
    1,254 on at
    Re: Detecting Out of Office issue

    I do this a little differently, and this works for me:

    David_0-1663263085055.png

     

    For the condition, I use the expression length(variables('OOO String')) from the variable I created. Then my flow does different things based on whether there is an automatic reply message set. I think the screen shot should be enough for your to see my differences since we are doing almost the same thing. For us, OOO is Out Of Office 🙂

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

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!

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 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1