Integration Service
latest
false
Using Variables in Connector Builder - Automation Cloud latest
Banner background image
logo
Integration Service User Guide
Last updated 2024年2月14日

Using Variables in Connector Builder

Many third-party applications that UiPath can connect with require some sort of dynamic setup, specifically when building the connector for a broader audience. The Base URL might require an organization parameter, every API call might require input that was returned on authentication, etc.

As there are multiple ways to solve this problem, the easiest is to use variables such as {organizationId} or responseKey for these kinds of processes.

This page describes the areas within Connector Builder where you can add these variables and how to do it.

Note: Variables notation used within Connector Builder are just strings using curly brackets, i.e.: {myVariable}.

Base URL

The Base URL is the URL that is used by default for any HTTP request. In many cases this URL is static to the third-party application and, as such, using variables is out of scope. Some vendors require to address all API calls to your specific instance of their application or add some sort of identifier into the base path identifying your identity.

Let’s use the example of connecting to your UiPath Orchestrator instance, which requires organization and tenant details in the Base URL. That is used later on as the base path for any future request. When users import this connector onto their tenant and create a connection, you can ask them for that information by adding these parameters as variables and requesting them on the authentication screen.

To do this, start by adding the variables in base url with {organization} and {tenant} notation.

docs image

Authentication

Within the authentication definition the details are localized within the table that lists all parameters, disregarding the Authentication type. The table provides a quick inline edit option or a far more advanced screen by using the actions at the end of every row.

In the example of the Orchestrator API, we want to add 2 extra parameters to the table since we require the user creating a connection to provide input for {organization} and {tenant}.

docs image
The settings for these rows are the name as you want these fields to show up in the connection screen, empty value and yes on the ask the user so it will be prompted on screen. The variable definition happens when clicking edit parameter.

docs image
In this example the parameter Organization name which is requested to the user, is sent to the provider as organization and sent as a path parameter. The same thing is done for tenant which then results in this authentication screen where all parameters are passed in and organization + tenant are now parts of the Base URL.

docs image

Sending Requests

Using variables in your resources works very similarly and after importing swagger files, this might already be visible on resources that are GETBYID that take in a {id} which is then also represented in the parameters section.
For Orchestrator the following example uses that variable for {key}.

docs image
  • Base URL
  • Authentication
  • Sending Requests
Support and Services icon
Get The Help You Need
UiPath Academy icon
Learning RPA - Automation Courses
UiPath Forum icon
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.