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 Feb 6, 2025

Example A: Build a connector from a blank canvas with Personal Access Token authentication

In the following example, we build a connector for OpenAI DALL-E from a blank canvas, using Personal Access Token authentication.

Create the new connector

This example shows how to use OpenAI model DALL-E to generate an image based on a text prompt.

  1. In Automation CloudTM, navigate to Integration Service.
  2. From the connector catalog page, select Build your connector or Connector Builder.
  3. Next, select Create New Connector.
  4. Select Start from blank.
  5. Add a Name for your connector and, optionally, a description and icon.
  6. Select Create.

    This image shows the steps to create a new connector from scratch

Configure the API resource

How it works

First, let's see how generating an image through API works.

With DALL-E, you supply a prompt, the model automatically rewrites it for safety reasons, and adds more details. Detailed prompts generally result in higher quality output. Then, the model outputs the generated image either through a link ("responseformat": "URL") or a Base64 string ("responseformat": "b64_json"). The URL is the default value, per the API specification. For more details on the API parameters, refer to API Reference - OpenAI API.
Here is an example cURL to generate an image using this API:
cURL https://api.openai.com/v1/images/generations \ 

  -H "Content-Type: application/json" \ 

  -H "Authorization: Bearer $OPENAIAPIKEY" \ 

  -d '{ 

    "model": "dall-e-3,""prompt": "A robot automating human task in computer,""n": 1, 

    "size": "1024x1024" 

  }'cURL https://api.openai.com/v1/images/generations \ 

  -H "Content-Type: application/json" \ 

  -H "Authorization: Bearer $OPENAIAPIKEY" \ 

  -d '{ 

    "model": "dall-e-3,""prompt": "A robot automating human task in computer,""n": 1, 

    "size": "1024x1024" 

  }'

Set up the authentication mechanism and resources

There are three key things you need to be aware of in building the first API resource for your connector:

  • Base URL
  • Authentication type
  • API Operation and Resource (sometimes called routes)

Dissecting the previous cURL, you can observe the following components:

  • Base URL: https://api.openai.com/images
  • Authentication type: Authorization: Bearer $OPENAIAPIKEY
  • API Operation and Resource: post /generations

The Base URL provides the location or endpoint of the API resource for which the calls are to be made.


Setting the Base URL

The Authentication type tells the connector how the user is authenticated before being permitted to utilize the API resource. In this example, we are using Personal Access Token as a Bearer Token in the Authorization header, using the OpenAI API key.


Configuring the Personal Access Token authentication

The API routes – the operation and resource – provide the path to a specific resource available on the API, for example /generations. The resource is appended to the base URL, in which that resource can be fetched/listed (GET), added to/inserted (POST ), updated/upserted (PATCH/PUT), or deleted (DELETE).

Configuring the resource

You can add as many API resources and operations as you want, based on the activities that you need for your workflow. For example, you can generate images (POST /generations), list all the generated images with GET /generations (if the GET operation is available for the resource), or edit an existing image (POST /edits).
Note: Connector Builder currently supports application/json as payload Content type and not form data. The Image Edit functionality of the DALL-E model may not be possible with Connector Builder at the moment.

Test the API resource output

Before you publish and use the connector in your workflow, test it first.

  1. Make sure your connector is in Connected status. Select Add connection in the upper-right corner of the window and set up a connection through the selected authentication mechanism.

    Creating the connection with a Personal access token

  2. Navigate to your first API resource and select Send Request.
  3. Provide the body or payload for the API, as indicated in the following cURL script:
    { 
        "model": "dall-e-3", 
        "prompt": "A robot automating human task in computer", 
        "n": 1, 
        "size": "1024x1024" 
      }{ 
        "model": "dall-e-3", 
        "prompt": "A robot automating human task in computer", 
        "n": 1, 
        "size": "1024x1024" 
      } 

    A POST/generations request


    Response example


    The generated image

Configure the activities

Now that you are able to test your connector, you can configure the design of the workflow component for this specific activity, through Activity designer.

Activity Designer helps curate input and output fields that you want to expose to users for this activity. This represents the "look and feel" when the API connector is used in UiPath Studio or Studio Web. For more information, see Activity designer.

You can change the display name of fields, mark input fields as required or not, whether they are a primary or secondary parameter etc. The input fields are auto-generated from the request fields or body once you perform a Send Request action.

Configuring custom activities with Activity Designer

As for the response or output fields, you can update the response root key so you can curate specific output attributes from the API response, like revised_prompt or URL, as captured in the following image.

FROM: no response root key


TO: response root key = data

Publish the connector

Next, publish your connector in your tenant of choice. For more information, see Publishing your connector. Then you can use it in your Studio Desktop or Studio Web workflows.

Studio Web

  1. In Studio Web, create a new project. In the activity search panel, search for your custom activity and add it to your workflow.

    Adding a custom activity in Studio Web

  2. From the custom activity, create the connection, then start configuring the parameters.
  3. Test your workflow.

Studio Desktop

Note:

You need Studio Desktop 2023.10 or newer.

  1. Make sure Studio Desktop is connected to the same tenant where the connector was published.
  2. In the Activities panel, make sure the Available filter is enabled.
  3. In the Activities panel, under the Available section, search for your connector name. Drag and drop any activity to your workflow. This installs the unified UiPath.IntegrationService.Activities package, containing all Integration Service-based activities, including your custom ones.
  4. Alternatively, you can use the Manage Packages panel to search for and install the UiPath.IntegrationService.Activities package.

    Adding a custom activity in Studio Desktop

Was this page helpful?

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