September 21, 2021

Introduction to Windows Power Automate Desktop (Free)

Learn how you can utilize this free application to automate any workload which you can think of. It is like RPA (Robotic Process Automation) on steroids for Free. What else do you want to build your career at the same time automate a bunch of stuff?

In this series we are going to learn a lot about what is Windows Power Automate (WPA) Desktop, how can we get started with it and what can it do to help you build automation. We will learn some Bots which I have created, things that it can automate, and their limitations (if any). Let’s get started.

Bots are here

In this blog post we will learn the pre-requisites and what do we need to get started with learning RPA at the same time do some serious automation with it.

What do we need to get started:

  • Windows 10 Machine, your own PC which you are using day to day (for learning and casual bot creation).
  • A Dedicated Windows 10 Machine, which you will not touch or use other than working on RPA or bots. It has to be different than your daily machine. You can also use a powerful Virtual Machine which can run Windows 10 but ensure that these machiens are always on else the scheduled bots will not work.

Steps:

  1. Download Windows Power Automate (WPA) Desktop from here Install Power Automate Desktop on your device – Power Automate | Microsoft Docs
  2. Install with all the default options.
  3. Sign-in with your Microsoft Account (email address like hotmail, create one if you do not have it)
  4. Click on New Flow button to kick start the first RPA Bot
New Flow button in Windows Power Automate (WPA) Desktop

5. Give it a name like – Launching Notepad
6. Click on Create

Let’s get started:
As the name suggests, this is our very first RPA bot in which we are going to learn how to launch an application, write something in it and save the file to the desired location.

Best Practices:
As per any coding best practices we will take care of the following and try to follow it as much as we can throughout all the codes which we will write:
1. Always have Change history recorded and giving every release a version number.
2. Document every key step so that we don’t forget later on the reason for adding it.
3. Try to be modular as much as possible and reuse the code whenever we need it in a new program (bot).
4. Adding error handling and error reporting (we will learn about it later in the series).
5. Logging every execution with timestamps.

Here is the first step, Creating Change History, and version numbers.

Add Comment from the left side actions and type the following:
Version 1.0
2021-09-11
========================
* Initial Program Created

This will remind you when did you first create this and what changes you made every time you updated this program.

Next time when you have to update this program you have to just come back here to the same comment and then add an additional line like Version 1.1 with the date and the updated comments like what all did you add or modify so that you have the record for the improvements, bugfixes or the changes you have been making into the program. Over a period of time, this will create a beautiful history of the journey you have come in the programs you have created.

Click Save

The next step is to search for Application in the actions menu and select or drag Run Application to the code. Type the path of Notepad.exe as shown below and click Save.

Additionally (as stated above) you can add a comment before this line to document what you are doing so that it is easy for your to search back or look back at the code to repurpose it.

Next Step – Add Wait

While it is purely optional, it is a good idea to add few seconds of wait time after any new window or application launch. This will ensure that the system is able to open the file before you take the next step.

Next Step – Write something in the Notepad window

As shown above, drag Send Keys, write something in it, and hit save.

We are not going to save the file as we are yet to learn a few things before we do the heavy lifting, for the time being, we are done. Click on the Run or Play button in the Windows Power Automate (WPA) Desktop window or press F5.

See the magic happen shown below:

If everything worked out well, you should have something similar to what is shown above.

Congratulations. You just made your very own, very first BOT. It is still a newborn baby but soon with the help of these sessions this baby is going to grow into a tall dark and handsome young man. Don’t forget to save your Bot.

Thanks for reading along, we will learn more about the Bots in the upcoming blog posts.

Leave a Reply

Your email address will not be published. Required fields are marked *