See the supported connectors for Application Integration.
Webhook trigger
The Webhook trigger is a Connector Event trigger that lets you invoke an integration based on any events from the backend that supports webhooks. The Webhook trigger receives events from third-party SaaS-based applications that support webhook eventing capability. This trigger supports multiple authentication types for your event listener.
Before you begin
If you plan to create or configure a new connection for the Webhook trigger, make sure that you have the following Identity and Access Management (IAM) role on the project:
- Connector Admin (
roles/connectors.admin
)
For information about granting roles, see Manage access.
Grant the following IAM roles to the service account that you want to use for the Webhook trigger:
- Application Integration Invoker (
roles/integrations.integrationInvoker
)
For information about granting roles to a service account, see Manage access to service accounts.
Add the Webhook trigger
To add a Webhook trigger to your integration, perform the following steps:
- In the Google Cloud console, go to the Application Integration page.
- In the navigation menu, click Integrations
The Integrations List page appears listing all the integrations available in the Google Cloud project.
- Select an existing integration or click Create integration to create a new one.
If you are creating a new integration:
- Enter a name and description in the Create Integration pane.
- Select a region for the integration.
- Select a service account for the integration. You can change or update the service account details of an integration any time from the Integration summary pane in the integration toolbar.
- Click Create.
This opens the integration in the integration editor.
- In the integration editor navigation bar, click Triggers to view the list of available triggers.
- Click and place the Webhook trigger element in the integration editor.
To configure the Webhook trigger, you can either use an existing Webhook connection available in Integration Connectors, or create a new Webhook connection using the inline connection creation option.
Configure Webhook trigger using an existing connection
You can configure the Webhook trigger using an existing Webhook connection in Integration Connectors. Note that the Webhook trigger is an Connector Event trigger, therefore you can only use a Webhook connection with event subscription enabled to configure the trigger.
For information about how to configure a Webhook trigger using a new Webhook connection, see Configure Webhook trigger using a new connection
To configure a Webhook trigger using an existing Webhook connection, perform the following steps:
- Click the Webhook trigger element in the integration editor to open the trigger configuration pane.
- Click Configure trigger.
- Provide the following configuration details in the Connector Event Trigger Editor page:
- Region: Select the region of your Webhook connection.
- Connection: Select the Webhook connection that you want to use.
Application Integration only displays those Webhook connections that are active and have an event subscription enabled.
- Event subscription type: Enter the type of event that you want to use to trigger the integration.
- Service Account: Select a service account with the required IAM roles for the Webhook trigger.
- Click Done to complete the trigger configuration and close the page.
Configure Webhook trigger using a new connection
To configure the Webhook trigger using a new Webhook connection, perform the following steps:
- Click the Webhook trigger element in the integration editor to open the trigger configuration pane.
- Click Configure trigger.
- Skip the Region field.
- Click Connection and select the Create Connection option from the menu.
- Complete the following steps in the Create Connection pane:
- In the Location section, choose the location for the connection.
- Region: Select a location from the list.
Supported regions for connectors include:
For the list of all the supported regions, see Locations.
- Click Next.
- Region: Select a location from the list.
- In the Connection Details section, complete the following:
- Connector: Select Webhook from the drop down list of available Connectors.
- Connector version: Select the Connector version from the drop down list of available versions.
- Connection Name: Enter a name for the Connection instance.
Connection names must meet the following criteria:
- Connection names can use letters, numbers, or hyphens.
- Letters must be lower-case.
- Connection names must begin with a letter and end with a letter or number.
- Connection names cannot exceed 49 characters.
- For connectors that support event subscription, the connection names cannot begin with the "goog" prefix.
- Description: Optionally, enter a description for the connection instance.
- Service Account: Select a service account that has the required roles.
- Event Subscription: Event subscription will be enabled by default and is mandatory for webhook connector.
- Optionally, click + Add label to add a label to the Connection in the form of a key/value pair.
- Click Next.
-
In the Event Subscription Details section, complete the following:
- Listener Authentication: Select an authentication type for event listener and enter the relevant details.
The following authentication types are supported by the webhook listener:
- No Authentication
- Google Authentication: Ensure that the service account has roles/connectors.listener role whose access token is used for authentication.
- API Key Authentication
- Basic Authentication
- Event Type Field Location: Mandatory field which denotes the location (Header, Query Param or Request Body) where event type associated with the incoming event request will be present.
- Event Type Field Name: Mandatory field in the configured location identifies the type of event associated with the incoming event request.
- Select Enable private connectivity for secured connectivity between your backend application and your connection. If you select this option, you must perform additional configuration steps after creating the connection. For more information, see Private connectivity for event subscription.
- Enter the dead-letter configuration. If you configure dead-letter, the connection writes
the unprocessed events to the specified Pub/Sub topic. Enter the following details:
- Dead-letter project ID: The Google Cloud project ID where you have configured the dead-letter Pub/Sub topic.
- Dead-letter topic: The Pub/Sub topic where you want to write the details of the unprocessed event.
- Click Next.
{ "event_type": "user.created", ... // other request fields ... }
In the example above, the event_type field in request body signifies that the request pertains to a "user.created" event. - Listener Authentication: Select an authentication type for event listener and enter the relevant details.
- Review: Review your connection and listener authentication details.
- Click Create.
- In the Location section, choose the location for the connection.
Trigger output
The Webhook trigger takes a couple of minutes to complete the event subscription configuration. You can view the status of your event subscription in the trigger configuration pane under Event Subscription details.
The Webhook trigger indicates the status of an event subscription using the following states:
Creating
: Indicates that the trigger is subscribing to the event subscription.Active
: Indicates that the trigger is successfully subscribed to an event subscription.Error
: Indicates that the there is an issue with the configured event subscription.
In addition to the event subscription status, the Event Subscription details section also displays other details such as connection region, connection name, event subscription name, and more.
Trigger output variable
For each event, the Webhook trigger generates a ConnectorEventPayload
output variable which you can use in your downstream tasks. The output variable is in JSON format containing the output Webhook payload schema.
View event subscriptions
To view and manage all the event subscriptions associated with a connection in Integration Connectors, do the following:
- Go to Integration Connectors > Connections page.
- Click the connection for which you want to view the subscriptions.
- Click the Event subscriptions tab.
This displays all the event subscriptions for the connection.
Edit Webhook trigger
You can edit a Webhook trigger to change or update the connection configuration and event subscription details.
To edit a Webhook trigger, perform the following steps:
- Click the Webhook trigger element in the integration editor to open the trigger configuration pane.
- Click Configure Webhook trigger.
- Do the following in the Connector Event Trigger Editor page:
- To retain the previously configured event subscription, click Retain, else click Delete.
- Update the connection configuration and event subscription details as desired.
- Click Done.
You can view the updated connection and event subscription details in the trigger configuration pane under Event Subscription details.
Quotas and limits
For information about quotas and limits, see Quotas and limits.
What's next
- Learn about all tasks and triggers.
- Learn how to test and publish an integration.
- Learn about error handling.
- Learn about integration execution logs.