integration-service
latest
false
UiPath logo, featuring letters U and I in white
Integration Service User Guide
Automation CloudAutomation Cloud Public SectorAutomation Suite
Last updated Nov 21, 2024

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

In the authentication setup, 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 more advanced screen by using the More options menu .

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

When you add a new authentication parameter, you must set the Name (how you want to specific field to be displayed in the connection screen), its Value (which you can leave empty), and Ask the user field, if you want to the parameter to be required during authentication.

To define a variable for a parameter, select the More options menu .


docs image

In this example, the Organization name parameter, which is requested to the user (Ask the user is set to Yes), is sent to the provider as organization (name) and path (type).

The same thing is done for tenant. Then, in the authentication screen, Organization name and Tenant name are required fields, and the organization and tenant are part 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}.


  • Base URL
  • Authentication
  • Sending requests

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.