Skip to main content

Google Cloud Pub/Sub

Integrate Google Cloud Pub/Sub with Torq to send and receive messages between independent applications.

Updated over 2 weeks ago

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

  1. Add the Integration: Navigate to Build > Integrations > Triggers > Google Cloud PubSub and click Add Instance.

  2. Configure the Integration:

    1. Enter a unique and meaningful name.

  3. 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

  1. Open the Google Cloud Console: Navigate to IAM & Admin > Create a Project.

  2. Create a New Project:

    1. Enter a meaningful name for the project.

    2. Select an organization.

    3. Select the location.

  3. Finalize: Click Create.

Step Three: Create a Service Account in the Project

  1. Create a Service Account: Navigate to IAM & Admin > Service Accounts and click Create service account.

  2. Configure the Service Account:

    1. Enter a meaningful name.

    2. Enter a unique ID.

    3. (Optional) Provide a description.

    4. Click Create and continue.

    5. (Optional) Grant the service account access to a project.

    6. (Optional) Grant users or groups access to the service account.

  3. Finalize: Click Done.

Step Four: Create a Pub/Sub Topic

  1. Open the Pub/Sub page: Navigate to Solutions > All products and click Pub/Sub. This will enable the Cloud Pub/Sub API.

  2. Create a Topic: Go to Pub/Sub > Topics and click CREATE TOPIC.

  3. Configure the Topic:

    1. Enter a meaningful name.

    2. Disable Add a default subscription. You will create a customized subscription later.

  4. Finalize: Click CREATE.

Step Five: Create a Pub/Sub Subscription

  1. Create a Subscription: Go to the topic's SUBSCRIPTIONS tab and click CREATE SUBSCRIPTION.

  2. Configure the Subscription:

    1. Enter a meaningful Subscription ID.

    2. Select Push for the delivery type.

    3. Paste the Torq endpoint URL you copied earlier.

  3. 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!

Did this answer your question?