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
Step One: 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.
Finalize: Click Add and Copy the generated endpoint. You will need the URL to create the Pub/Sub subscription.
Step Two: Create a Project in GCP
Open the Google Cloud Console: Navigate to IAM & Admin > Create a Project.
Create a New Project:
Enter a meaningful name for the project.
Select an organization.
Select the location.
Finalize: Click Create.
Step Three: 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.
Finalize: Click Done.
Step Four: 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.
Finalize: Click CREATE.
Step Five: 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.
Finalize: 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!