Google Cloud Pub/Sub is a messaging middleware developed by Google that enables asynchronous message transmission.
Use Google Cloud Pub/Sub to trigger workflows in Torq
Create a Google Cloud Pub/Sub trigger integration in Torq
Add the integration: Navigate to Build > Integrations > Triggers > Google Cloud PubSub and click Add Instance.
Configure the integration:
Enter a unique and meaningful name.
Click Add.
Copy the generated endpoint. You will need the URL to create the Pub/Sub subscription.
Create a project in GCP
Open the Google Cloud console: Navigate to IAM & Admin > Create a Project.
Create a project:
Enter a meaningful name for the project.
Select an organization.
Select the location.
Click Create.
Create a service account in the project
Create a service account: Navigate to IAM & Admin > Service Accounts and click Create service account.
Configure the service account:
Enter a meaningful name.
Enter a unique ID.
(Optional) Provide a description.
Click Create and continue.
(Optional) Grant the service account access to a project.
(Optional) Grant users or groups access to the service account.
Click Done.
Create a Pub/Sub topic
Open the Pub/Sub page: Navigate to Solutions > All products and click Pub/Sub. This will enable the Cloud Pub/Sub API.
Create a topic: Go to Pub/Sub > Topics and click CREATE TOPIC.
Configure the topic:
Enter a meaningful name.
Disable Add a default subscription. You will create a customized subscription later.
Click CREATE.
Create a Pub/Sub subscription
Create a subscription: Go to the topic's SUBSCRIPTIONS tab and click CREATE SUBSCRIPTION.
Configure the subscription:
Enter a meaningful Subscription ID.
Select Push for the delivery type.
Paste the Torq endpoint URL you copied earlier.
Click CREATE.
Now that you've successfully created a Google Cloud Pub/Sub trigger, you can build your first Pub/Subâinitiated workflow!
In Torq, go to Build > Workflows > Create a Workflow > New Blank Workflow, and select the trigger type: Integrations > Google Cloud PubSub. Find your new trigger, and automate away!





