top of page

Run a Desktop Flow by pushing a physical button - No premium license required



Automation and the ability to automate and improve my efficiencies in my work and home life, lead me to the career I have today. I often try to automate things which may seem minor to others, but just increase my work speed by decreasing manual inputs. One of the things I do 5 days a week is open up a certain number of applications, configure them the way I want them for my day.


One thing that I've always done is configured applications to run on start up. But some companies restrict this and you can't always get all the apps to start. I have multiple Chrome profiles so I need to select the right ones and I also keep a day book in my OneNote (an application I can't open automatically) so I open it, add a new page with todays date. I have a Stream Deck and I launch several applications through that, so I looked at how to create a Desktop flow to automate the last few bits I have not been able to.


Open Power Automate Desktop and select new flow.

Give the flow and name and decide if you want to turn on the Power Fx preview. I enabled it as I am familiar with Power Fx.

Choose the recorder at the top and the recorder will document each of the steps that you want to record.


In my instance, I select the correct Chrome profile, Open OneNote for Windows 10, add a new page, select the page title and add in todays date. You list of actions recorded should look like this:



The last step "Send Keys" has hard coded in todays date, what we want is to get todays date and format it to follow a pattern and then send that, rather than me having to write it in each day. Search for an action called "Convert datetime to text" and add that in to your flow.



Add the action (and move it above the "Send Keys" if needed) in and double click on it to configure it. With Power Fx enabled, I selected the Fx button and searched for a function called Today.

This gives you.....today as a date 😅. Change the format to Custom and then put in the custom format that suits you, I use dd/MM/yy and you can see the sample show you what the date will look like.

It automatically creates a variable for you called FormattedDateTime. Then press save. Double click on Send Keys and remove the hard coded date, choose the variable button {x} and choose your variable.



Press save and then save your Desktop flow. It should look something like the below.



That's great, now we just navigate back to our Main flow page, choose my flows, the 3 dots and create shortcu....


Oh no! It's premium?? I haven't kept up with Power Automate Desktop licensing too much, but I thought by running it manually from a shortcut, it would still be counted as triggered manually, but Microsoft deem this as a premium privilege. So although my Power Automate Desktop flow is running as me and not triggered by a cloud flow, I would still have to pay to just open up some applications and put in todays date....Not Today!! Fellow MVP Agnius Bartninkas author of the Power Automate Desktop Framework, shared a handy little tip. Keyboard Shortcuts! You can trigger a Desktop Flow from a keyboard shortcut.


Instead of trying to create a desktop shortcut, choose properties.



And define the shortcut you want to use (obviously make it something you are not likely to need in your day to day work) and press save.


On my Stream Deck, I open the application and edit my existing button and add a new action "System: Hotkey" and add in the hotkey/shortcut.

And voila, when I press the button on my Steam Deck, it opens my applications, triggers the shortcut, which downloads and runs the desktop flow, no premium license required 😎


Ciao for now!

MCJ

Comments


bottom of page