See the supported connectors for Application Integration.
Cloud Pub/Sub trigger
The Cloud Pub/Sub trigger lets you run your integration based on the events in your Pub/Sub middleware.
Using this trigger, you can execute an integration whenever a publisher writes a message to your chosen topic. The topic can exist in the same Google Cloud project as the integration, or in a different Google Cloud project. When this trigger executes, it also writes the published message to the CloudPubSubMessage output variable. Based on your requirements, you can use this variable in your downstream triggers or tasks.
Before you begin
Ensure that you perform the following tasks in your Google Cloud project before configuring the Cloud Pub/Sub trigger.
- Assign the Project IAM Admin (roles/resourcemanager.projectIamAdmin) to the user creating this trigger.
- Enable the Pub/Sub API for the Google Cloud project that has your integration.
- Confirm that you have a Cloud Pub/Sub topic. To create a new Cloud Pub/Sub topic:
For more information about managing access using IAM roles, see Access control.
For information on granting roles to principals, see Granting, changing, and revoking access.
Add a Cloud Pub/Sub triggerTo add a Cloud Pub/Sub trigger to a new or existing integration, follow the steps below:
- 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 Cloud Pub/Sub trigger element to the designer.
Configure a Cloud Pub/Sub trigger
Click the Cloud Pub/Sub trigger element in the integration editor to view the trigger configuration pane, and then do the following tasks:
- Specify the topic the trigger should listen to in the Pub/Sub topic field in the following format:
To view all the available topics in your Google Cloud project, see the Topic name column in Topics.Where:
- PROJECT_ID is the Google Cloud project where your topic is created.
- TOPIC_ID is the ID of your Pub/Sub topic. The topic can be in the same Google Cloud project as that of your integration, or can be present in a different Google Cloud project.
- Select the service account that you want to use for the trigger. Selecting a service account, prompts
you to grant the required roles. For more information, see Required IAM roles.
If there are no service accounts, create a service account by clicking Create new in the Service account drop-down.
IAM roles required for service accounts
Clicking Grant when selecting a service account, automatically provides the following roles to the various service accounts.
|Service account||IAM role granted|
|Application Integration's default service account:
If the Pub/Sub topic's Google Cloud project is different from the integration's Google Cloud project, the default service account needs Pub/Sub Editor role in the topic's Google Cloud project.
|Service account that you select for this trigger||
Application Integration Invoker (
For each event, the Cloud Pub/Sub trigger generates a CloudPubSubMessage output variable which you can use in your downstream tasks. The variable is in JSON format and has the PubsubMessage structure.
- The maximum size of a Pub/Sub message is 10 MB. To understand all the limitations of Pub/Sub, see Pub/Sub quotas and limits.
- It is possible that Pub/Sub writes the same message more than once to a topic. To understand this behavior of Pub/Sub, see At-Least-Once delivery. Therefore, you must design your integration to be idempotent so that it doesn't allow a message to be written more than once to a topic.
The Cloud Pub/Sub trigger is dependent on the Pub/Sub
product. As this dependency is external to the Application Integration, the Application Integration
Service Level Agreement (SLA) terms and conditions are applicable only when the
Cloud Pub/Sub trigger successfully starts the execution of an