cancel
Showing results for 
Search instead for 
Did you mean: 
yashag2255

Automation Squared using MS Flow and UiPath

Background on UiPath: If you are aware of what RPA and UiPath are please feel free to skip to the next section. In this section I will give you a small background of what RPA is and how we can build RPA solutions with UiPath. RPA is an acronym for Robotic Process Automation and RPA is the use of software integrated with out of the box capabilities such as machine learning, automated recorded action steps, artificial intelligence etc. to ease repeated tasks such as data entry, handling, scraping, transaction processing etc. The UiPath RPA platform provides us with the capability to build processes and automations that can be used to achieve RPA processes such as automating manual repetitive processes. More at UiPath RPA

In this article I will show you how we can create a simple automation process in UiPath and trigger that automation from MS Flow. We will run an action in Flow and based on the outputs of that, we will pass parameters to the UiPath process and trigger the robot through the UiPath Orchestrator API and achieve the desired automation. More on UiPath Orchestrator API : UiPath Orchestrator API Reference

Let us consider the time card logging task for this automation. ‘A’ is an employee of the ‘XYZ’ organisation. ‘A’ has to log their time card every day and the process is generally to log into the time card portal -> navigate to the timecard page -> select the task and fill up the effort for the task -> save and submit the time card. Considering this problem statement, I divided the automation task into two parts.

1. Performed by Flow: I created a flow where, ‘A’ will just have to select the Task code and the number of hours in the Flow trigger -> Flow will then authenticate to the UiPath orchestrator through an API call (HTTP POST request) -> Flow retrieves the authentication token and gets the process key through another API call (HTTP GET request) -> Flow now uses the authentication token, the process key and the user input to start a job that triggers a robot to run the automation process on the user machine (HTTP POST request).automationSquared2.png

2. Performed by the UiPath Robot: In the UiPath studio, I created a state machine process that has multiple states. Once triggered, the first state is to login to the time card portal using the credentials of ‘A’ (hardcoded in this process) -> once the login is successful, the robot extracts the task code sent as an input argument from flow and compare that with a pre-populated task code. Upon matching the task code, the robot now starts the process of navigating to the time card and selecting the requested task code and filling in the hours (sent as an input argument from the flow trigger). Once done, it saves and submits the form, clicks a screenshot and sends a confirmation email to ‘A’ along with the screenshot. In an event where the task code is not recognised, the robot terminates the process by directly sending an email to ‘A’ stating the invalid task code error reason.automationSquared.png

Although most of the hard work in this scenario was done by the UiPath RPA process, my intention through this post is to show a seamless integration between the two tools using the HTTP action that can automate about anything. This was a simple web recording type scenario but imagine situations where you have custom desktop applications that are accessed through VM’s under various environments. The UiPath studio provides with a capability of automating processes inside of VM’s under Citrix environments and once connected to the UiPath Orchestrator, these processes can be executed based on triggers, actions and plans that are configured in Flow.

I hope you found this interesting and it helped you. Thank you for reading!

Comments
Anonymous

Does flow requires SSL cert that are authorized by global cert authority?

Put another way, will it work with locally authorized domains (.local) ?

Hey @Anonymous 

 

Do you mean that you have the UiPath Orchestrator running on your private network (I mean to ask have you installed it on an Azure service or something that you can access it on the internal endpoints only?)

 

If so, I am not sure if we can send a direct HTTP request to internal endpoints as the external traffic will be blocked. I have never used the UiPath orchestrator or the robot that way as it needs a premium license. 

 

Currenlty, the team is probably working on including a proper connector for UiPath with flow. You can upvote the idea and add a few lines here too: https://powerusers.microsoft.com/t5/Flow-Ideas/Connect-to-UiPath-RPA-Tool/idi-p/295138

 

Hope this Helps!

 

Thanks, 

Anonymous

Hi @yashag2255 ,

 

Thanks for your reply. I did suspect that is the case. 

In this instance, we originally wanted to keep the access private so have only configured the UiPath Orchestrator with a .local domain. Then we realize Microsoft Flow service runs externally so unable to resolve the hostname of the Orchestrator.

Cheers

 

Anonymous

I can't seem to insert the "result" from the authenticate step to the following http activities easily. 
There was only "body" available. 

Adding "Parse JSON" in between does allow me to extract the "result" from the "body" though. 

Hey @Anonymous , The Orchestrator REST API has changed a bit after this blog was written. Note: You will not get the 'result' as a dynamically selectable attribute. Once authenticated, please go to the run history and check the output. Here you will find the result in JSON and then in the flow, you need to either use parse JSON or write an expression to get to the result attribute. 

 

Hope this Helps!

Hey @Anonymous 

 

Here is the expression I used to get the result: 

body('Authenticate_UiPath_Orchestrator')['result']

This gets the authorisation token. 

 

Here, Authenticate_UiPath_Orchestrator is the name of the Send and HTTP request action. 

 

Hope this Helps!

Anonymous

Thanks @yashag2255 . Much appreciated.

Hi, Please help me

 

in my company we are using on-premise Uipath Orchestrator i have follow above steps but i am not able to connect each time when i am trying to authenticate it send me error with  " The provided host name URL could not be resolved.

 

I using same on swagger and its working fine and authenticate well.

Thank you @yashag2255 for sharing a valuable Article. and kindly read our blog you might be interested. How is Robotic Process Automation Transforming the Digital World

  • HI Thank you yashag, for your blog Automation Squared. please keep sharing updated articles. Here is our blog on How is Robotic Process Automation Transforming the Digital World you might be interested into this article, 
About the Author
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • I am a Microsoft Business Applications MVP and a Senior Manager at EY. I am a technology enthusiast and problem solver. I work/speak/blog/Vlog on Microsoft technology, including Office 365, Power Apps, Power Automate, SharePoint, and Teams Etc. I am helping global clients on Power Platform adoption and empowering them with Power Platform possibilities, capabilities, and easiness. I am a leader of the Houston Power Platform User Group and Power Automate community superuser. I love traveling , exploring new places, and meeting people from different cultures.
  • Read more about me and my achievements at: https://ganeshsanapblogs.wordpress.com/about MCT | SharePoint, Microsoft 365 and Power Platform Consultant | Contributor on SharePoint StackExchange, MSFT Techcommunity
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Founder of SKILLFUL SARDINE, a company focused on productivity and the Power Platform. You can find me on LinkedIn: https://linkedin.com/in/manueltgomes and twitter http://twitter.com/manueltgomes. I also write at https://www.manueltgomes.com, so if you want some Power Automate, SharePoint or Power Apps content I'm your guy 🙂
  • I am the Owner/Principal Architect at Don't Pa..Panic Consulting. I've been working in the information technology industry for over 30 years, and have played key roles in several enterprise SharePoint architectural design review, Intranet deployment, application development, and migration projects. I've been a Microsoft Most Valuable Professional (MVP) 15 consecutive years and am also a Microsoft Certified SharePoint Masters (MCSM) since 2013.
  • Big fan of Power Platform technologies and implemented many solutions.
  • Passionate #Programmer #SharePoint #SPFx #M365 #Power Platform| Microsoft MVP | SharePoint StackOverflow, Github, PnP contributor
  • Web site – https://kamdaryash.wordpress.com Youtube channel - https://www.youtube.com/channel/UCM149rFkLNgerSvgDVeYTZQ/