Set yourself to Do Not Disturb using Power Automate Desktop

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.

Set yourself to Don not Disturb in Microsoft Teams using Power Automate Desktop flows.
Set yourself to Do Not Disturb using Power Automate Desktop 1

Starting with a Launch new Chrome action, I open a browser to open the teams URL.

Set yourself to Do Not Disturb using Power Automate Desktop
Set yourself to Do Not Disturb using Power Automate Desktop 2

This can take a little while, therefore my next step is a 5 second wait

Set yourself to Do Not Disturb using Power Automate Desktop
Set yourself to Do Not Disturb using Power Automate Desktop 3

Then I add a select menu option in window

Set yourself to Do Not Disturb using Power Automate Desktop
Set yourself to Do Not Disturb using Power Automate Desktop 4

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.

Set yourself to Do Not Disturb using Power Automate Desktop
Set yourself to Do Not Disturb using Power Automate Desktop 5

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.

Set yourself to Do Not Disturb using Power Automate Desktop
Set yourself to Do Not Disturb using Power Automate Desktop 6

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.

Set yourself to Do Not Disturb using Power Automate Desktop
Set yourself to Do Not Disturb using Power Automate Desktop 7

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.


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/ Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/ You can contact me using contact@sharepains.com

Related Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains

Subscribe now to keep reading and get access to the full archive.

Continue reading