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.
- 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:
- Go to the Pub/Sub topics page in the Cloud console.
- Click Create a topic.
- In the Topic ID field, provide a unique topic name.
- Click Save.
If the Pub/Sub API is protected by a service perimeter, ensure that you define the following IAM roles to manage these service perimeters:
For information on granting roles to principals, see Granting, changing, and revoking access.