Author Details

avatar-teacher

Evolvous

We are a team of tech enthusiast and this section is where we love to share our experience and our knowledge. We try our best to help you understand technical topics by giving you live instances of how-to’s, guides, tips, FAQ’s and troubleshoots.

If you like it or have questions, do share your feedback in the comments section below.

Automate with RPA in Microsoft Power Automate

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.

Let’s discuss your project

What is Robotic Process Automation (RPA)? 

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. 

Why should we use Microsoft RPA? 

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. 

Automate with RPA in Microsoft Power Automate - Evolvous

 

Types of Robotic Process Automation (RPA) in Power Automate

  1. Attended RPA: Runs on a worker’s PC to automate cumbersome or repetitive processes, allowing the worker to correct any errors as needed. This approach achieves many benefits of automation while allowing for human intervention when human intelligence or business experience is required. 
  2. Unattended RPA: Runs with no user logged in. Workflows trigger in the background based on events that happen and then run at any time in the cloud. It is used to accelerate the automation of high-volume, repetitive tasks without lifting a finger. 

How to use RPA in Power Automate? 

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.  

Automate with RPA in Microsoft Power Automate - Evolvous

Figure 1 Contoso Invoice App 

Step-1) For using RPA, you must download two applications – click to download. 

  • Power Automate Desktop – Download 
  • On-Premises Data Gateway – 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. 

On premise data gateway Automate with RPA in Microsoft Power Automate. - Evolvous

Figure 2: OnPremises 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. 

Power Automate Desktop - Evolvous

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. 

Create new Invoice with Power automate Desktop - Evolvous

Figure 4 New flow window 

Let’s discuss your project

The above both red marked options are for recording human interaction and the difference is – 

  1. Web Recorder: This UI recorder is used when you want to perform any action in your web browser. E.g., opening a website and do some tasks, open a web application, and do some tasks, etc. 
  2. Desktop Recorder: This UI recorder is used when you perform any task on the windows app that is installed on your machine. E.g., windows form app, etc. 

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. 

 

Microsoft Power Automate RPA Automate with RPA in Microsoft Power Automate - Evolvous

Enter the variable name & external name to the field’s name i.e., AccountNamePrimaryContact & 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.

Automate with RPA in Microsoft Power Automate - Evolvous

The three actions have shown above need to be changed with the variables that we created. 

Double click on each action – 

Power automate with RPA - Evolvous

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  

Automate with RPA in Microsoft Power Automate - Evolvous

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 – 

How to use RPA in Power Automate? - Evolvous

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”.  

Run a flow built with Power Automate Desktop - Evolvous

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. 

Select the following and click create – 

  • Connect: Using an on-premises data gateway 
  • Gateway Name: the gateway that you created in step 2. 
  • Domain and Username: Username used in the gateway. 
  • Password: Password of the domain. 

Desktop Flows - Evolvous

Note: While connecting make sure your On-Premises Data Gateway is open in windows and looks like the below image.

on premise data gateway - Evolvous

After Connecting with the gateway your flow action will look like the below picture. 

run a flow built with power automate desktop-2 - Evolvous

Select the following – 

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. 

run a flow built with power automate desktop 2 - Evolvous

The basic flow is ready and it will look like this. 

Manually trigger a flow power automate - Evolvous

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.

Conclusion 

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.

Microsoft Power Platform Consulting Services - Evolvous

 


Written by Dipak Shaw

Dipak is Sr. Software Developer at Evolvous Limited – specialists in Microsoft Technologies.