Automate with RPA in Microsoft Power Automate. In this blog, we will learn the steps involved in automating your daily tasks using Robotic Process Automation (RPA) in Power Automate.
Earlier in 2020, Microsoft announced a recent technology within Power Automate called RPA (Robotic Process Automation).
Before discussing the Robotic Process Automation in Power Automate, let us talk about what is RPA and why we use RPA in a real scenario.
“RPA is an advanced form of business process automation that can record tasks performed by a human on their computer, then perform those same tasks without human intervention. Essentially, it is a virtual robot copycat.”
–Marcel Shaw, federal systems engineer at Ivanti.
Many enterprises use legacy, On-Premises software for their daily use. They cannot switch to another application, nor they can use API automation with their application.
There are several benefits of using RPA such as, they can automate their processes and exchange data with their legacy, on-premises software, and many more.
This UI-based approach turns manual tasks into automated workflows by recording and playing back human-driven interaction with software systems that do not support API-based automation.
In this demo, we are going to use the Contoso Invoice legacy app. Every time we will manually trigger the flow and provide inputs that will be filled by Power Automate Desktop into the Invoicing app.
Figure 1 Contoso Invoice App
Step-1) For using RPA, you must download two applications – click to download.
Step-2) Install the above two applications and log in with your account in On-Premises Data Gateway. This application works as a bridge to connect the Power Automate web to the desktop.
Figure 2: On–Premises Data Gateway
If you have already a gateway setup, you can use your existing gateway else you can create a new gateway.
Step-3) Now, we’ll create our desktop flow that will be used to perform our action over the legacy app. But unlike the normal flow actions, this time we will define the flow actions by recording our action on the desktop.
Open Power Automate Desktop and click New Flow and give your flow a name for e.g., “Create New Invoice” and click Create.
Figure 3: Creating new desktop flow
A new window will open with lots of actions in the left panel, top panel, and on the right side, variables.
Figure 4 New flow window
In this demo, we will use the Desktop Recorder to record our interactions from the very beginning (starting the app adding new data, and then close the app).
Click the Desktop Recorder and follow the below video:
Our actions are recorded in the flow now we’ll create 3 variables and place them where we wrote the 3 fields value manually so that it can take input from flow and write it in the app.
To create variables, click on the right side of the flow editor under “Input/Output variables” you will see two options (Input/Output). Select Input as this will take input as a parameter and then use it to replace action in the flow.
Enter the variable name & external name to the field’s name i.e., AccountName, PrimaryContact & ContactEmail. And the data type will be text.
Variables are created now we will insert the variable into our UI flow’s action where we wrote the text manually.
The three actions have shown above need to be changed with the variables that we created.
Delete the text, click on , and select the variable. The first action should have the variable “AccountName”, followed by “PrimaryContact” and “ContactEmail” into the second and third action, respectively.
After assigning the variables the flow will look like the below picture –
Our desktop flow is ready now. Click the Save icon to save the flow. Close the window.
Step-4) Now, we will create a cloud flow and connect the desktop flow with it. So, go to https://flow.microsoft.com and click Create on
Now give your flow the name “Contoso Desktop Invoice” and select the “Manual trigger a flow” trigger and click Create.
Add three input parameters in the flow trigger just like in the following image –
The user needs to submit these parameters while triggering the flow.
*Note: For the demo, I am using the manual trigger, but you can use your trigger according to your business need. E.g., When an item is created, PowerApps button flow, etc.
Now click + New Step to add an action. Search Desktop and select “Run a flow built with Power Automate Desktop”.
For the first time only, you must configure the connection with the On-Premises Data gateway to access the flows created by the desktop app.
Note: While connecting make sure your On-Premises Data Gateway is open in windows and looks like the below image.
After Connecting with the gateway your flow action will look like the below picture.
Desktop Flow: Select your desktop flow from the dropdown.
Run Mode: Attended
AccountName: “AccountName” dynamic content.
PrimaryContact: “PrimaryContact” dynamic content.
ContactEmail: “ContactEmail” dynamic content.
After selecting the parameters, the action will look like the below picture.
The basic flow is ready and it will look like this.
Save the flow. Now we will test the flow by clicking on the Test option and then selecting the Manual. After that provide some details in the fields.
Here is a video of testing the flow.
Well, this is the end of this post. Using the above process, you can configure and use the Power Automate Desktop RPA feature with your legacy app to automate your daily tasks.
Let me know if you have any queries or suggestions in the comment below. I will see you next time, till then Happy coding! Contact us to learn more.
Written by Dipak Shaw
Dipak is Sr. Software Developer at Evolvous Limited – specialists in Microsoft Technologies.