Skip to main content

Notifications

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

*This post is locked for comments

  • linkfields Profile Picture linkfields
    Posted at
    Automation Squared using MS Flow and UiPath
    • 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, 
  • linkfields Profile Picture linkfields
    Posted at
    Automation Squared using MS Flow and UiPath

    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

  • Daljit Profile Picture Daljit
    Posted at
    Automation Squared using MS Flow and UiPath

    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.

  • Automation Squared using MS Flow and UiPath

    Thanks @yashag2255 . Much appreciated.

  • yashag2255 Profile Picture yashag2255 24,454
    Posted at
    Automation Squared using MS Flow and UiPath

    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!

  • yashag2255 Profile Picture yashag2255 24,454
    Posted at
    Automation Squared using MS Flow and UiPath

    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!

  • Automation Squared using MS Flow and UiPath

    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. 

  • Automation Squared using MS Flow and UiPath

    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

     

  • yashag2255 Profile Picture yashag2255 24,454
    Posted at
    Automation Squared using MS Flow and UiPath

    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, 

  • Automation Squared using MS Flow and UiPath

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

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