Workflow Trigger Reference for Universal API Connector
Workflow Triggers initiate workflows and are used to define the data supplied to a workflow. Supported trigger Data Types for this connector are outlined below.
Basic details are shown in the table below.
Trigger Source | Description | Version |
---|---|---|
Get GraphQL Data |
Retrieve a list of data from the indicated GraphQL API route. Configuration options vary per vendor. | 2.3+ |
Universal API Message Source |
Retrieves a list of data from the indicated API route. Configuration options will vary depending on the vendor. | 2.0+ |
Trigger Sources
Get GraphQL Data
Trigger Source | Description | Version |
---|---|---|
Get GraphQL Data |
Retrieve a list of data from the indicated GraphQL API route. Configuration options vary per vendor. | 2.3+ |
Universal API Message Source
Trigger Source | Description | Version |
---|---|---|
Universal API Message Source |
Retrieves a list of data from the indicated API route. Configuration options will vary depending on the vendor. | 2.0+ |
Example Settings for Universal API Message Source
Universal API Connector is a general-purpose Connector that can be used to connect to numerous APIs. As a result, the following examples are not an exhaustive list of configures, but rather, cover some of the commonly configured settings.
Example: Detect an error in an http 200 response
This example applies to the following scenario:
- both failures and successes result in an http 200 (success) response
- failures are detected by including a specific keyword in the response body
The settings that apply to this scenario are the check-box option and its related settings: Fail trigger conditionally based on incoming data (response body)
When enabled, Fail trigger conditionally based on incoming data (response body)
will inspect the response body for a specific keyword or key-phrase under conditions (equals, contains, starts with, etc.)
Example: Fail the trigger when the response body data path //payload
starts with the phrase “Error found”.
To support this example, the configuration would look as follows.
-
Data Path to Inspect
=//payload
- this setting specifies which path in the response body will be inspected. -
Condition
=starts with
- When inspecting the data, this trigger will fail when the data “starts with” the comparison value below. Other options include “is equal to” and “contains” (among others). -
Comparison Value
=Error found
- This value ignores case, so that “ERROR FOUND”, “Error Found” and “error found” are all considered the same. Because the “Condition” was set to “starts with”, this will match “Error found in data retrieval” as well as simply “Error Found”. -
Error Message to Display
=Trigger failed due to API error.
- This optional setting will be displayed in the messages page and on the workflow trigger details, provided the data matches the condition, thereby causing the workflow trigger to fail. If this setting is left blank, a general-purpose error message will be displayed instead.