A while back I tried setting people to Do Not Disturb using Power Automate. In this post I will use Power Automate Desktop.
Power Automate Desktop
As there isn’t an API call available I used MyAnalytics events in my calendar to get users to Do Not Disturb status in Microsoft teams. Now with Poweer Automate Desktop I can do almost the same.
I’m going to start with the end product of my proof of concept.
In the recording below you will see my status being available and then when I run my Power Automate Desktop flow, my status changes to DND in Microsoft Teams
Building the Do Not Disturb flow
I’m going to assume that you have Power Automate Desktop installed. If you need any help with this then please feel free to hit the chat.
My overall flow has only 5 steps.
Starting with a Launch new Chrome action, I open a browser to open the teams URL.
This can take a little while, therefore my next step is a 5 second wait
Then I add a select menu option in window
The above step is used to select the little icon with a photo in Microsoft Teams. And then finally as the menu is unfolded, the Do not disturb status is selected.
The last step in my flow is a close browser as I like to leave the status of my browser as I found it at the start of my desktop flow, closed.
Running the Desktop flow
If you now want to set your status from a Power app or maybe from the start of an event in your calendar then you can run a flow with the run a flow built with Power Automate Desktop and your status will be changed automatically.
You might now get a message like this:
Your flow could not turn on: DND Test. Error: Flow ‘acf593a9-84e3-4eb9-98bf-3970376bcf31’ cannot be activated because an Unattended RPA add-on is required to enable this flow.
This means that you need to get your licence for unattended Desktop flows sorted out.
If you change the above flow to be an attended flow.