Triggers are essential for automating processes based on specific events, such as new file creation, email receipt, or database updates. By setting up triggers, we can streamline processes, save time, and reduce errors.
Triggers provide a mechanism for subscribing to specific events from third-party apps, which are passed through the connections. For example, a trigger can initiate an automation such as:
- Email Received: an automation can be triggered when a user receives a new email in their inbox.
- Form Submission: an automation can be triggered when a user submits a form on a website.
- New File Uploaded: an automation can be triggered when a new file is uploaded to a cloud storage service.
- Payment Received : an automation can be triggered when the inventory level of a product falls below a certain quantity.
These are just a few examples, and there are countless other possibilities depending on the integrations and events supported by the third-party apps and automation platforms you are using.
Wondering how we use these input arguments ?
When we set up a process designed to respond to specific events or actions, we use these input arguments to identify and process the events accordingly. Here's a brief explanation of how each input arguments can be used:
UiPathEventConnector: this allows us to determine which connector initiated the process. By knowing the specific connector that triggered the automation, we can customize the workflow to handle the event accordingly. For instance, different actions might be required for events coming from Salesforce compared to events from OneDrive.
UiPathEvent: this helps us understand the type of event that occurred, whether it is a creation, update, or deletion event. Depending on the event type, different actions or processes can be executed to respond appropriately.
UiPathEventObjectType: this defines the specific record type resulting from the event. It enables us to identify the nature of the event and the corresponding data involved. This information is vital for determining the subsequent steps in the automation process.
UiPathEventObjectId: this provides the unique identifier for the object involved in the event. With this ID, we can access the relevant data or resources related to the event and perform the required tasks accordingly.
How can we manage triggers already created?
View Trigger Details
To view the details of a trigger, simply click on the specific trigger from the list, and its configuration details will be displayed.
Activate/Deactivate a Trigger
To activate or deactivate a trigger, follow these steps:
Click on the trigger to view its details.
Locate the switch in the upper-left corner of the window.
Toggle the switch to activate (ON) or deactivate (OFF) the trigger as needed.
Automatic Disabling of Triggers Upon Failure
Triggers are subject to a retry mechanism with an exponential back-off strategy in case of failure. The retry attempts are as follows:
Each subsequent retry is delayed twice as long as the previous attempt.
If the Integration Service fails to start the job after 11 attempts (approximately 34 hours) for a single event, the trigger is automatically disabled and set to an error state.
Additionally, if the job fails to start for the last 100 events, the trigger is also disabled and set to an error state.
Delete a Trigger
To delete a trigger, follow these steps:
Navigate to the Triggers tab in the integrations window.
Locate the trigger you want to delete from the list.
Click the "More Actions" button corresponding to the trigger.
Select the "Delete" option from the menu to remove the trigger from the system.
Summary
- Triggers are a mechanism that enables us to subscribe to specific events from Connector platforms.
- Before using Triggers, certain prerequisites must be met:
- An automation project must be created and published.
- A trigger must be configured for the specific context of the automation.
- The event types configured for triggers can vary between different connectors.
- To provide vital information about trigger records, the process requires setting up pre-existing arguments in the process.
- UiPathEventConnector: this argument receives the name of the connector that triggered the process, allowing us to identify the source of the event.
- UiPathEvent: this argument contains the value of the event type that triggered the event (e.g., create, update, or delete).
- UiPathEventObjectType: this argument represents the record type resulting from defining the trigger, helping to identify the event.
- UiPathEventObjectId: this argument holds the object ID resulting from a specific event, providing a unique identifier for the affected object.
Note: these arguments are used to transfer relevant information from the Integration Service trigger to our automation process, enabling dynamic and context-specific responses to the events received.
Read Complete Series on UiPath Integration Service:
1. Introducing UiPath Integration Service
2. Using Integrations in UiPath Studio
3. Configuring Triggers in UiPath
4. Overview of UiPath Connector Builder
Source: UiPath Academy