Demos

How to integrate with UIPath robots

29min
scenario you have an unattended uipath robot that executes some actions these actions can now include procesio and the robot itself can also be started from procesio attended robots cannot be controlled from an external source, including procesio let's build this process! in this scenario we have three elements uipath robot a process started by the robot a process that can start the robot uipath robot in this example we create a simple unattended robot in uipath automation cloud if you have an unattended robot already created you can use it instead create and assign a machine step 1 go to "orchestrator", select tenant folder and in the "machines" tab press the add machine button and select standard machine step 2 configure the machine, allocate 1 production (unattended) license and press the provision button step 3 select the shared folder, go to "home" tab, press the machines group and press the manage machines in folder button step 4 select the machine you added and press the update button step 5 use the copy machine key to clipboard button or the button to select edit machine and copy the machine key the machine key configured in the uipath orchestrator will be used when configuring the unattended robot machine create robot user step 1 go to "admin" > "accounts & groups" and in "users" tab press the invite users button step 2 add an email address for an unattended user, select automation developers and press the invite button the user email address does not have to be valid it will work even if the invite is not accepted step 3 press the allocate licenses button, select automation developer named user and press save assign user to shared folder step 1 go to "orchestrator", select shared folder and in the "home" tab press the users group step 2 press the assign account/group button step 3 in the "account or group name" field search for the robot user you created and select it step 4 in "the roles for the account selected above" select robot and press save step 5 press the more actions button next to the robot user and select edit step 6 in user & roles press the next button and toggle unattended robot to enabled step 7 check machine login credentials and configure the domain\username and password used by the robot to run the process the robot uses windows credentials by default in this case you only need a windows user with a password and domain is the machine name domain\username \<machine name>\\\<username> you can find the machine name in "control panel" > "system and security" > "system" > computer name step 8 press the update button to add the changes prepare unattended robot machine in this example we are configuring a new machine for the robot if you have a machine already configured you can use it instead step 1 prepare a windows machine with a local user account that is password protected step 2 download on this machine uipath studio from the "home" page in uipath automation cloud step 3 install uipath studio and select custom (recommended for enterprise/advanced users) during the install process step 4 select unattended robot for the installation package and press the install button step 5 when installation is completed close the installer step 6 find the uipath assistant application using the start button or search bar, right click it and select run as administrator step 7 in uipath assistant press the user icon on the title bar and select preferences step 8 in preferences select orchestrator settings and copy/paste your uipath orchestrator url the url should use this format https //cloud uipath com/\<your account>/\<your tenant>/orchestrator https //cloud uipath com/ step 9 in machine key paste the machine key you saved when you created the machine in uipath automation cloud then press the connect button once the uipath assistant is connected the uipath robot can use it to execute processes a process started by the robot once a process is configured in procesio you can access it through the web api read more details in the procesio api documentation docid\ xrqxra7ijdtzxbiuggtjt article create or configure a procesio process step 1 in procesio "process designer" configure your process and save it run the process to check it works correctly step 2 copy the process id from the "process designer" page url and save it for later the url uses this format https //procesio app/admin/process/designer/\<process id> https //procesio app/ step 3 in procesio go to "settings", select the api key tab and press the create api key button step 4 copy both the key name and key value and save them for later they will be used in uipath to access the procesio web api create an uipath process step 1 go to uipath automation cloud , login and download uipath studio from the home page step 2 install uipath studio using the quick (recommended for community users) option step 3 launch uipath studio and in the "new project" tab select process step 4 configure the project information, press the create button and click open main workflow in the center of the page when finished step 5 press manage packages button in the toolbar, select "official" in the left menu and search for uipath webapi activities once found select it and press the install and save buttons step 6 in activities search for http request once found under "available" > "app integration" > "web" drag it on the main workflow step 7 use http request wizard to configure the api call to procesio using the process id you saved end point "https //webapi procesio app/api/projects/\<process id>/run" request method post step 8 after pressing the ok button go to properties pane to add the rest of the api information step 9 in "options" group set the following values body "{\n\\"connectionid\\" \\"string\\"\n}" body format application/json headers name direction type value key in string the key name you saved, in quotes (eg "\<key>" ) value in string the key value you saved, in quotes (eg "\<value>" ) parameters name direction type value runsynchronous in string "true" secondstimeout in string "10" step 10 debug the project step 11 go to procesio, select "process designer", press the button next to your process and select view instances check if the process was started by uipath step 12 once the procesio process is started from uipath press the publish button in uipath studio step 13 in publish process dialog configure the package name and version then select "publish options" in the left menu and in publish to select orchestrator tenant processes feed step 14 press the publish button when ready to add the process to uipath automation cloud configure the process for your robot step 1 go to uipath automation cloud and select "orchestrator" step 2 select the shared folder, press the processes group and press the add process button step 3 in package overview click the package source name field , search for the published process and select it step 4 press the next button until the last page and then press the create button start the process you can now start the process using the robot step 1 in uipath automation cloud go to "orchestrator", select shared folder and press the processes group step 2 press the start a job button next to the process step 3 in the execution target tab use the account field to select the robot user created at the start of this guide also use the machine field to select the machine you configured step 4 in the runtime license field select production (unattended) step 5 press the start button a process that can start the robot any uipath unattended robot can be started by a procesio process here are the steps involved allow external application in uipath step 1 go to uipath automation cloud and select "admin" step 2 select external application and press the add application button step 3 in the add application page set the application name and press the add scopes button step 4 in the edit resource panel click on the resource field and select orchestrator api access step 5 select application scope(s) , search execution and check or execution also search jobs and check or jobs step 6 press the save button to close and panel and the add button to add the application step 7 copy and save the app id and app secret and press the close button create procesio process to start the robot there are multiple actions involved in starting an uipath robot the complete process should look like this step 1 go to "process designer", create a new process and save it step 2 add a call api action and in the side panel set the node name to refreshtoken step 3 go to "credential manager", press the add new button and use these values name uipathrefreshtoken credential type rest api configuration step 4 press the next step button and use these values url https //account uipath com/oauth/ https //account uipath com/oauth/ method get test endpoint token authentication method no authentication step 5 press the save button, go to "process designer" and edit the process created at step 1 step 6 select the refreshtoken action to show the side panel in select api configuration select uipathrefreshtoken step 7 press the configure request button and add these values verb post endpoint /oauth/token headers key value x uipath tenantname \<your tenant> your tenant name can be copied from the uipath automation cloud orchestrator url the url uses this format https //cloud uipath com/\<your account>/\<your tenant>/orchestrator body { "grant type" "refresh token", "client id" "\<your client id>", "refresh token" "\<your user key>" } client id and user key can be found in uipath automation cloud "admin" > "tenants" > expand your tenant > orchestrator "api access" button (cloud icon) step 8 go to "data model designer" and press the create data model button step 9 in display name write uipathtokenresponse and press the create button step 10 use the add attribute button to add these attributes display name name type single value json property access token access token string ✔ access token token type token type string ✔ token type step 11 use the create data model button and in display name write uipathrelease step 12 use the add attribute button to add these attributes display name name type single value json property key key string ✔ key name name string ✔ name organizationunitid organizationunitid integer ✔ organizationunitid step 13 use the create data model button and in display name write uipathreleasesresponse step 14 use the add attribute button to add this attribute display name name type single value json property value value uipathrelease ❌ (list) value step 15 go to "process designer" and edit the process created at step 1 step 16 add a new variable in the process name type default value single value set as refreshtokenresponse uipathtokenresponse ✔ output step 17 select the refreshtoken action, press the configure request button and in body output add the refreshtokenresponse variable step 18 add a map process data action and in the side panel set the node name to prepareauth step 19 press the map process data button and add the following variables authorizationvalue < refreshtokenresponse token type refreshtokenresponse access token there is a space (' ') between token type and access token token type will be bearer and access token your authorization token step 20 go to "credential manager", press the add new button and use these values name uipathreleases credential type rest api configuration step 21 press the next step button and use these values url https //cloud uipath com/\<your account>/\<your tenant>/odata/ https //cloud uipath com/ method get test endpoint releases authentication method no authentication your account and tenant names can be copied from the uipath automation cloud orchestrator url the url uses this format https //cloud uipath com/\<your account>/\<your tenant>/orchestrator step 22 press the save button, go to "process designer" and edit the process created at step 1 step 23 add a new variable in the process name type default value single value set as releasesresponse uipathreleasesresponse ✔ output step 24 add a call api action and in the side panel set the node name to getreleases in select api configuration select uipathreleases step 25 press the configure request button and add these values verb get endpoint /releases body output releasesresponse variable headers key value x uipath tenantname \<your tenant> x uipath organizationunitid \<your organization unit id> authorization authorizationvalue (variable from step 19 ) x uipath organizationunitid can be retrived by calling the releases endpoint without the x uipath organizationunitid header \ remove the x uipath organizationunitid from the getreleases action \ run the process and in the check instance page copy the value of the releasesresponse variable \ in this value each process will contain the organizationunitid value \ copy the organizationunitid for your process and add it for x uipath organizationunitid in the getreleases action headers step 26 add a new variable in the process name type default value single value set as filteredreleases uipathrelease ❌ (list) output step 27 add a beta > list filter action and in the side panel set the node name to filterreleases step 28 press the configure button and add these values list to filter releasesresponse value variable filtered list filteredreleases variable filter json configuration { "fieldmatches" \[ { "fieldname" "name", "matchtype" "exact", "filterexpression" "\<your uipath process name>", "keepiftrue"\ true } ] } you can find the uipath process name in uipath automation cloud > orchestrator > shared > processes step 29 add a new variable in the process name type default value single value set as releaseinfo uipathrelease ✔ output step 30 add a list > get x element action and in the side panel set the node name to getreleasekey step 31 in the side panel add these values input a list filteredreleases variable input the index of the element 0 result releaseinfo variable step 32 go to "credential manager", press the add new button and use these values name uipathstartrobot credential type rest api configuration step 33 press the next step button and use these values url https //cloud uipath com/\<your account>/\<your tenant>/odata/jobs method get test endpoint uipath server configuration odata startjobs authentication method no authentication your account and tenant names can be copied from the uipath automation cloud orchestrator url the url uses this format https //cloud uipath com/\<your account>/\<your tenant>/orchestrator step 34 press the save button, go to "process designer" and edit the process created at step 1 step 35 add a call api action and in the side panel set the node name to startrobot in select api configuration select uipathstartrobot step 36 press the configure request button and add these values verb post endpoint /uipath server configuration odata startjobs headers key value content type application/json authorization authorizationvalue (variable from step 19 ) x uipath tenantname \<your tenant> x uipath organizationunitid \<your organization unit id> x uipath organizationunitid can be retrieved as explained at step 25 body { "startinfo" { "releasekey" "<%releaseinfo key%>", "strategy" "modernjobscount", "jobscount" 1, "inputarguments" "{}" } } step 37 connect all actions in sequence step 38 save the process, validate and run congrats! the process will now start your uipath process using the configured robot