{"id":38781,"date":"2024-08-02T15:14:10","date_gmt":"2024-08-02T09:44:10","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=38781"},"modified":"2024-08-02T15:14:10","modified_gmt":"2024-08-02T09:44:10","slug":"user-availability-monitoring-with-power-automate","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2024\/08\/user-availability-monitoring-with-power-automate\/","title":{"rendered":"User Availability Monitoring with Power Automate"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone wp-image-38792 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"2800\" height=\"1600\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate.png 2800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-300x171.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-1024x585.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-768x439.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-1536x878.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-2048x1170.png 2048w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-660x377.png 660w\" sizes=\"(max-width: 2800px) 100vw, 2800px\" \/><\/p>\n<p style=\"text-align: justify;\">In today&#8217;s workplaces, staying in sync with your team&#8217;s availability is key to smooth collaboration. Fortunately, tools like Power Automate offer an easy way to monitor when your colleagues are in or out of the office. In this guide, we&#8217;ll walk through the process of setting up an automated system using Power Automate&#8217;s Outlook connector to effortlessly keep tabs on users&#8217; availability statuses.<\/p>\n<p style=\"text-align: justify;\">Before starting, some customization needs to be done prior to creating the Power Automate flow. Under the user entity, create an &#8220;Availability&#8221; Boolean field. Rename &#8220;Yes&#8221; to &#8220;Available&#8221; and &#8220;No&#8221; to &#8220;Unavailable,&#8221; then add it to the user entity form.<\/p>\n<p style=\"text-align: justify;\"><strong>Step 1<\/strong>: This step involves setting up a scheduled trigger in Power Automate to execute the flow daily. To do this, create a recurrence flow (as shown below) and set the interval and frequency according to your requirements. Within the flow, initialize new variables to store the current date and time (<strong>currentDatetime<\/strong>), as well as the start and end dates (<strong>startDate<\/strong> and <strong>endDate<\/strong>) for checking the out-of-office status. Additionally, initialize a Boolean variable, <strong>isOutOfOffice<\/strong>, to track whether the user is currently out of the office.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-38782 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-1.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"1139\" height=\"513\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-1.png 1139w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-1-300x135.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-1-1024x461.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-1-768x346.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-1-660x297.png 660w\" sizes=\"(max-width: 1139px) 100vw, 1139px\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 2<\/strong>: To access the List row action, add a new step and use the Microsoft Dynamics connector (as indicated below). Here, we need to provide the fetchXML to retrieve the list of active users. Under the &#8220;Fetch XML Query&#8221; field, enter the XML mentioned below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-38783 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-2.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"571\" height=\"503\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-2.png 571w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-2-300x264.png 300w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-38784 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-3.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"425\" height=\"559\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-3.png 425w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-3-228x300.png 228w\" sizes=\"(max-width: 425px) 100vw, 425px\" \/><\/p>\n<pre class=\"lang:css gutter:true start:1\">FetchXmL:\r\n&lt;fetch version=\"1.0\" output-format=\"xml-platform\" mapping=\"logical\" distinct=\"false\"&gt;\r\n&lt;entity name=\"systemuser\"&gt;\r\n&lt;attribute name=\"fullname\" \/&gt;\r\n&lt;attribute name=\"businessunitid\" \/&gt;\r\n&lt;attribute name=\"title\" \/&gt;\r\n&lt;attribute name=\"address1_telephone1\" \/&gt;\r\n&lt;attribute name=\"positionid\" \/&gt;\r\n&lt;attribute name=\"systemuserid\" \/&gt;\r\n&lt;attribute name=\"internalemailaddress\" \/&gt;\r\n&lt;order attribute=\"fullname\" descending=\"false\" \/&gt;\r\n&lt;filter type=\"and\"&gt;\r\n&lt;condition attribute=\"accessmode\" operator=\"eq\" value=\"0\" \/&gt;\r\n&lt;condition attribute=\"isdisabled\" operator=\"eq\" value=\"0\" \/&gt;\r\n&lt;condition attribute=\"setupuser\" operator=\"eq\" value=\"0\" \/&gt;\r\n&lt;\/filter&gt;\r\n&lt;\/entity&gt;\r\n&lt;\/fetch&gt;\r\n<\/pre>\n<p style=\"text-align: justify;\"><strong>Step 3<\/strong>: Iterate through the list of users obtained in the previous step, and for each user, utilize the <strong>&#8220;Get mail tips for a mailbox (V2)&#8221;<\/strong> action from the Outlook connector in Power Automate. Pass the user&#8217;s primary email address as input to the email address Item. The output will provide details such as Out of Office status, Mailbox Full status, and Automatic Replies status.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-38785 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-4.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"579\" height=\"393\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-4.png 579w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-4-300x204.png 300w\" sizes=\"(max-width: 579px) 100vw, 579px\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 4<\/strong>: After retrieving the mail tips for each user, verify whether the fields containing information about Automatic Replies Message, Scheduled Start Time, and Scheduled End Time are not null. To implement this verification, add a new condition and apply the following rules as such to fulfil the condition shown in the snippet.<\/p>\n<p style=\"text-align: justify;\">Snippet: <strong>Automatic Replies Message! = null &amp;&amp; Scheduled Start Time! = null &amp;&amp; Scheduled End Time! = null<\/strong><\/p>\n<p style=\"text-align: justify;\">Upon examination of the snippet, it is evident that if any of these fields are null, it signifies that the user has not configured an out-of-office message. In such instances, set the &#8216;isOutOfOffice&#8217; variable to false for that user.<\/p>\n<p style=\"text-align: justify;\"><strong>Step 5<\/strong>: If the fields for Automatic Replies Message, Scheduled Start Time, and Scheduled End Time are not null, it signifies that the user has configured an out-of-office message. So, in the true section, convert the UTC timestamps provided in the mail tips to the customer&#8217;s time zone to ensure an accurate comparison with the current datetime. Store these converted timestamps in respective variables as shown below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-38786 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-5.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"679\" height=\"545\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-5.png 679w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-5-300x241.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-5-660x530.png 660w\" sizes=\"(max-width: 679px) 100vw, 679px\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 6<\/strong>: Compare the current datetime with the converted Scheduled Start Time and Scheduled End Time. If the current datetime falls within the range of the user&#8217;s out-of-office period, set the isOutOfOffice variable to true, indicating that the user is currently out of the office. Otherwise, set it to false. To determine if the user&#8217;s schedule is currently active, compare the Scheduled Start Time with the currentDatetime by checking if the Scheduled Start Time is less than or equal to the currentDatetime, and if the Scheduled End Time is greater than or equal to the currentDatetime using the query:<\/p>\n<p style=\"text-align: justify;\"><strong>Query: Scheduled Start Time &lt;= currentDatetime &amp;&amp; Scheduled End Time &gt;= currentDatetime<\/strong><\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"alignnone wp-image-38787 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-6.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"1131\" height=\"503\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-6.png 1131w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-6-300x133.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-6-1024x455.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-6-768x342.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-6-660x294.png 660w\" sizes=\"(max-width: 1131px) 100vw, 1131px\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 7:<\/strong> Below the <strong>condition<\/strong> section, add the &#8220;Update a row&#8221; action under the Microsoft Dataverse connector. Select the user entity and set the &#8220;isOutOfOffice&#8221; value in the &#8220;Availability&#8221; field.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-38788 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-7.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"555\" height=\"417\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-7.png 555w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-7-300x225.png 300w\" sizes=\"(max-width: 555px) 100vw, 555px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-38789 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-8.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"915\" height=\"359\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-8.png 915w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-8-300x118.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-8-768x301.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-8-660x259.png 660w\" sizes=\"(max-width: 915px) 100vw, 915px\" \/><\/p>\n<p style=\"text-align: justify;\"><strong>Step 8: <\/strong>Clear the variable values after updating the user entity. Once the flow is triggered and the user entity is updated, we will be able to see the user&#8217;s availability as shown below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-38790 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-9.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"553\" height=\"369\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-9.png 553w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-9-300x200.png 300w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-38791 size-full\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-10.png\" alt=\"User Availability Monitoring with Power Automate\" width=\"377\" height=\"365\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-10.png 377w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2024\/08\/User-Availability-Monitoring-with-Power-Automate-10-300x290.png 300w\" sizes=\"(max-width: 377px) 100vw, 377px\" \/><\/p>\n<h2 style=\"text-align: justify;\"><strong>Conclusion<\/strong>:<\/h2>\n<p style=\"text-align: justify;\">By following these steps, you can easily capture the user availability defined in Outlook and maintain it in Dynamics 365 CRM.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/services\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone wp-image-35375 size-full\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/07\/Increase-Productivity-by-Automating-your-daily-mundane-tasks-Get-your-custom-developments-done-by-Inogics-Certified-Experts-1.gif\" alt=\"\" width=\"700\" height=\"200\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In today&#8217;s workplaces, staying in sync with your team&#8217;s availability is key to smooth collaboration. Fortunately, tools like Power Automate offer an easy way to monitor when your colleagues are in or out of the office. In this guide, we&#8217;ll walk through the process of setting up an automated system using Power Automate&#8217;s Outlook connector\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2024\/08\/user-availability-monitoring-with-power-automate\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1985],"tags":[2914],"class_list":["post-38781","post","type-post","status-publish","format-standard","hentry","category-power-automate","tag-user-availability-monitoring"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/38781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=38781"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/38781\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=38781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=38781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=38781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}