Check to See If Someone Is out of Office
    • Dark
      Light
    • PDF

    Check to See If Someone Is out of Office

    • Dark
      Light
    • PDF

    Article Summary

    Automation is great when it works, but poor when it doesn’t. One scenario that often causes challenges for people is dealing with approvals when someone is out of the office. If you have an approval that requires a quick turnaround, but don’t know that person is out of the office (OOF) it can lead to a business process breakdown.

    So how can we detect when someone is out of the office? The good news is this functionality is available through the Office 365 Outlook connector and the Get mail tips for a mailbox (V2). This action takes advantage of an Exchange feature called Mail Tips and can detect situations when the email recipient is out of office, has a full mailbox, is a non deliverable recipient and much more.

    In our scenario, we want to send an approval to a user but the Approvals connector will not detect whether or not someone is out of the office. But, by using the following approach we can determine when this occurs by

    • Adding the Get mail tips for a mailbox (V2) action onto our designer and then provide the internal email address that we want to check to see if they are out of office.

    Note: For the purpose of this blog post we will use a manual trigger, but that is arbitrary.

    1-design(2)

    Note: External out of office recipients may also be detected, provided they meet certain requirements. Please see Microsoft documentation for more information.

    • The output of this action will generally determine one of two paths: the recipient is not out of office or they are out of office. Let’s take a look what happens when they are not out of office first. When this occurs, the following payload will be returned from the action. In this case we will see a node called automaticReplies that is empty.

    2-NoOoF

    • Otherwise, when we do have someone who is out of office, the following payload will be returned. Here we can see the automaticReplies node is populated with the recipient’s out of office message.

    3-OoF

    • We can add a condition after this action which will allow us to implement custom logic to address our escalation needs. To simplify things, we will add a Compose action and populate it with automaticReplies dynamic content. Next, we need to determine if this node is empty or contains data. To determine this, we will use the empty expression and include our Compose action as the input parameter. The empty expression will return a boolean value that will be true when there is no data and false when there is data. We can then implement our customer logic as required.

    4-condition

    Conclusion

    The Get mail tips for a mailbox (V2) action is a simple but effective way to determine if someone is out of office. By using it, we can avoid business processes from breaking down when an approval is about to be sent to someone who is out office. Instead, we can provide a delegate such as their leader when this does happen.


    Was this article helpful?