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.

To learn how to create a sample integration using Application Integration and the Cloud Pub/Sub trigger trigger, see Listen to Cloud Pub/Sub topic and send an email.

Using this trigger, you can execute an integration whenever a publisher writes a message to your chosen topic. 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.
  • If the Pub/Sub API is protected by a service perimeter, ensure that you define the following IAM roles to manage these service perimeters:

    • Access Context Manager Admin (roles/accesscontextmanager.policyAdmin)
    • Access Context Manager Editor (roles/accesscontextmanager.policyEditor)
    • Access Context Manager Reader (roles/accesscontextmanager.policyReader)

  • Confirm that you have a Pub/Sub topic. To create a new Pub/Sub topic:
    1. Go to the Pub/Sub topics page in the Cloud console.

      Go to the Pub/Sub topics page

    2. Click Create a topic.
    3. In the Topic ID field, provide a unique topic name.
    4. Click Save.
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 trigger

To add a Cloud Pub/Sub trigger to a new or existing integration, follow the steps below: