UiPath Notifier

Overview

You can use the Hyperscience UiPath output connector to integrate directly with a UiPath Orchestrator Queue. Using the connector, all document-processing notifications, including extracted data, are queued directly in UiPath for further processing by a UiPath robot.

If you would like to use the UiPath Notifier connection in a SaaS instance and your service is not public, you should create a firewall pinhole for the connection. Contact your Hyperscience representative for more information.

Block settings table

In addition to the settings outlined below, you can also configure the settings described in Universal Integration Block Settings

Connection settings

Name

Required?

Description

Organization Unit ID

No

The name of the organizational unit, or folder, that the submission data should be sent to.

To find the ID of the folder you're connecting to, click on Folders in the Management section of the left-hand sidebar in UiPath Orchestrator, click on the folder, and locate the fid parameter of the URL shown in your browser's address bar. The number following fid= is your folder's UiPath Organizational Unit ID.

Queue

Yes

The name of the queue that messages should be sent to.

URL

Yes

The UiPath Orchestrator URL.

Auth settings

Name

Required?

Description

Authentication Method

Yes

Available options:

Tenant

Yes

The name of the tenant that contains the queue.

This setting is available only if Authentication Method is set to Basic Authentication by Microsoft.

Username

Yes

The username of a user that has access to the tenant.

This setting is available only if Authentication Method is set to Basic Authentication by Microsoft.

Password

Yes

The password of a user that has access to the tenant.

To edit the password, click Edit value, modify the password, and then click Done.

This setting is available only if Authentication Method is set to Basic Authentication by Microsoft.

OAuth Token Endpoint

No

The endpoint to retrieve the access token, if your OAuth URL is not the default (https://cloud.uipath.com/identity_/connect/token).

This setting is available only if Authentication Method is set to OAuth.

App ID

Yes

The client_id of the UiPath application used for this connection.

This setting is available only if Authentication Method is set to OAuth.

App Secret

Yes

The client_secret of the UiPath application used for this connection.

This setting is available only if Authentication Method is set to OAuth.

Configuring OAuth connections

To use OAuth as an authentication method, you need to give Hyperscience access to UiPath by creating an application in UiPath Orchestrator. The application must have the following specifications:

  • Application type — Confidential

  • Scope — Application

  • Grant — Client credentials

It also needs to have OR.Queues grants at the application scope.

The application’s redirect URL can be any valid URL; there are no other requirements for it.

To learn more about creating an application in UiPath Orchestrator, see UiPath’s Accessing UiPath Resources Using External Applications.

Setting up UiPath Notifier

To set up the UiPath Notifier, you need to configure the connection in both UiPath and Hyperscience.

1. Create a robot that submits documents to Hyperscience

Hyperscience provides an easy-to-use REST API for document submissions that UiPath can integrate with out of the box. 

Below is a simple example of how to configure a UiPath Activity, which sends a submission request to a Hyperscience API endpoint. The corresponding UiPath Studio project, including the XAML definition file, is attached. When you import the XAML file in UiPath Studio as a UiPath Activity, you will have to set the following arguments in order to successfully connect to a Hyperscience instance:

  • Token:  Authorization Token 

  • Server:  The API endpoint

  • FileLocation:  The location of the submission file. This must be a pdf, tiff, png or jpeg in a location accessible to the machine running the UiPath robot.

UiPath_1.png

The submission workflow contains two steps: initialization and upload. In the first step, a set of internal variables are initialized to the connection and file location arguments described above.

UiPath_2.png

In the second step, a POST request is made to the Hyperscience API endpoint, which creates a document submission. The API responds with a document ID that is used to track the document in the Hyperscience software. Any state change notifications provided by Hyperscience as the document is being processed will reference this document ID.

UiPath_3.png

Note that this example does not include any error handling. If, for example, the API call to create a submission in Hyperscience is unsuccessful, the process will fail, and this will be reported back to the parent UiPath workflow. In a production environment, it is recommended that you implement error handling that is consistent with your business requirements and processes.

2. Configure Hyperscience to send notifications to a UiPath Queue

Hyperscience can be configured to send output notifications to a UiPath Orchestrator Queue via the Hyperscience UiPath output connector. Notifications are thus queued for further processing by a UiPath Robot. More details on how to configure the connector can be found in the Block settings table earlier in this article.

3. Configure UiPath to handle Hyperscience notifications

After Hyperscience is configured to send notifications for submission state changes to a UiPath Queue, a UiPath Robot can be set up to process the data received in each state change notification.

Below is an example of a recommended workflow. The corresponding UiPath Studio project, including the XAML definition file, is attached.

UiPath_4.png

Import the XAML file in UiPath Studio as a UiPath Activity. The Activity can then be added in larger workflows and set up to process notifications on Hyperscience document submission state changes received on a UiPath Queue. Finally, the Activity should be configured to forward the notification data for further processing depending on your business rules and processes.

The following occurs when a UiPath robot executes this workflow:

  • If the queue is empty, the robot waits some time (e.g. 10 seconds) before checking the queue again.

  • If the queue is not empty, a notification is retrieved, acknowledged, and sent for further processing. The contents of the notification are saved in a variable called notification, which is in the format of a Hyperscience submission object as it has been defined in our API documentation.

  • The Flow Switch routes the UiPath robot to the appropriate event handler based on the updated status of the notification (i.e. processing, completion, or supervision).

  • Depending on your business processes, any of these event handlers can be configured to perform the necessary processing. For example, a supervision notification will contain a supervision URL, which can be presented to a user in your system to perform the required task. On the other hand, a complete notification will contain the transcription results, which can be validated or persisted to a data store.

Note that there is an argument in the Dequeue a message step that should be configured to the name of the UiPath Queue as defined in the Hyperscience deployment environment parameters.