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

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.

    2. Click Add.

    3. Copy the generated endpoint. You will need the URL to create the Pub/Sub subscription.

Create a project in GCP

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

  2. Create a project:

    1. Enter a meaningful name for the project.

    2. Select an organization.

    3. Select the location.

    4. Click Create.

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.

    7. Click Done.

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.

    3. Click CREATE.

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.

    4. 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?