Skip to main content

Google Cloud Pub/Sub Connector

Google Cloud Pub/Sub Manage topics, subscriptions, and messages in Google Cloud Pub/Sub.

Connections

Google Pub/Sub Private Key

Authenticate requests to Google Cloud Storage using values obtained from the Google Cloud Platform.

InputCommentsDefault
Client EmailThe service account email address from the Google Cloud service account JSON key file.
Private KeyThe private key from the Google Cloud service account JSON key file. This should be the entire key value including the BEGIN and END markers.
Project IDThe Google Cloud project ID that contains the Pub/Sub resources.
ScopesSpace-delimited list of OAuth 2.0 scopes. See OAuth 2.0 Scopes for Google APIs for more information.https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/pubsub

OAuth2

OAuth2 Connection

All requests to the Google Cloud Pub/Sub API must be authorized by an authenticated user.

To create a Google Cloud Pub/Sub OAuth 2.0 connection, configure an OAuth application in the Google Cloud Console.

Prerequisites

  • A Google Cloud account with access to create projects and credentials
  • A Google Cloud project (or the ability to create one)

Setup Steps

  1. Navigate to the Google Cloud Console and select or create a project
  2. From APIs & Services > Library, search for and enable the Cloud Pub/Sub API
  3. Navigate to APIs & Services > Credentials and select Create Credentials
  4. Choose OAuth client ID
  5. If this is the first time creating credentials, configure the OAuth consent screen:
    • Enter an App name (company or product name)
    • Provide a User support email
    • Add App logo, Application home page, and Authorized domains as needed
    • Enter Developer contact information
  6. On the Scopes screen, select Add Or Remove Scopes:
    • Search for "Pub/Sub" and add the following scopes:
      • https://www.googleapis.com/auth/cloud-platform
      • https://www.googleapis.com/auth/pubsub
    • Refer to Google's OAuth 2.0 Scopes documentation for additional scope information
  7. Return to Create OAuth client ID:
    • Under Application type select Web application
    • Provide a Name for the OAuth client
    • Under Authorized redirect URIs click Add URI and enter: https://oauth2.integrations.acme.com/callback
    • Click CREATE
  8. Copy the Client ID and Client Secret from the confirmation dialog

The Client ID and Client Secret can be retrieved later from APIs & Services > Credentials under the OAuth 2.0 Client IDs section by selecting the name of the OAuth client.

Configure the Connection

  • Enter the Client ID and Client Secret from the OAuth client created above
  • For Scopes, use the following value:
    https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/pubsub

This connection uses OAuth 2.0, a common authentication mechanism for integrations. Read about how OAuth 2.0 works here.

InputCommentsDefault
ScopesSpace-delimited list of OAuth 2.0 scopes. See OAuth 2.0 Scopes for Google APIs for more information.https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/pubsub
Client IDThe Client ID from the Google Cloud OAuth 2.0 credentials.
Client SecretThe Client Secret from the Google Cloud OAuth 2.0 credentials.

Triggers

PubSub Notification

PubSub Notification Trigger Settings

Actions

Create Subscription

Creates a subscription to a given topic.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
SubscriptionThe name of the subscription to create.
TopicThe name of the topic from which this subscription is receiving messages. The value of this field will be deleted-topic if the topic has been deleted.
Topic Name or Full FormatSelect whether the topic input is a full resource path (e.g., 'projects/my-project/topics/my-topic') or just the topic name (e.g., 'my-topic').
Push ConfigConfiguration for push delivery. See PushConfig for more information.
BigQuery ConfigConfiguration for BigQuery delivery. See BigQueryConfig for more information.
Ack Deadline SecondsThe time (in seconds) Pub/Sub waits for acknowledgment before resending the message. Must be between 10 and 600 seconds. Default is 10 seconds if not specified.
Retain Acked MessagesWhen true, acknowledged messages are retained in the subscription's backlog until they fall outside the messageRetentionDuration window. Required for seeking to past timestamps.false
Message Retention DurationThe minimum duration to retain a message after publication. Must be between 10 minutes (600s) and 31 days (2678400s). Format: duration in seconds with up to nine fractional digits, ending with 's' (e.g., '3600s' for 1 hour).
LabelsLabels to organize and group resources. See Creating and Updating Labels for more information.
Enable Message OrderingWhen true, messages with the same orderingKey are delivered to subscribers in the order they are received by Pub/Sub.false
Expiration PolicyPolicy specifying when the subscription expires. Default TTL is 31 days if not set. See ExpirationPolicy for more information.
FilterA filter expression to select which messages are delivered. See Filtering Messages for syntax.
Dead Letter PolicyPolicy for dead lettering undeliverable messages. See Dead Letter Topics for more information.
Retry PolicyPolicy for retrying message delivery. See RetryPolicy for more information.
DetachedWhen true, the subscription is detached from its topic and will not receive messages or retain backlog.false
Enable Exactly Once DeliveryWhen true, Pub/Sub guarantees exactly-once delivery semantics for messages on this subscription.false
Topic Message Retention DurationOutput-only field indicating the minimum duration messages are retained in the topic. Format: duration in seconds ending with 's' (e.g., '86400s').
StateOutput-only field indicating whether the subscription can receive messages.

Create Topic

Creates the given topic with the given name.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
TopicName of the new topic
LabelsLabels to organize and group resources. See Creating and Updating Labels for more information.
Message Storage PolicyPolicy constraining the Google Cloud regions where messages may be stored. See Message Storage Policy for more information.
KMS Key NameThe resource name of the Cloud KMS CryptoKey used to protect access to messages published on this topic. See Customer-Managed Encryption Keys for more information.
Schema SettingsSettings for validating messages against a schema. See Schema Settings for more information.
Satisfies PZSWhen true, indicates the topic satisfies physical zone separation. This is an output-only field reserved for future use.false
Message Retention DurationThe minimum duration to retain a message after publication. Must be between 10 minutes (600s) and 31 days (2678400s). Format: duration in seconds with up to nine fractional digits, ending with 's' (e.g., '3600s' for 1 hour).

Create Webhook Subscription

Creates a webhook subscription to a given topic.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
Subscription NameThe name of the subscription to create.
TopicThe name of the topic. Can be either the topic name (e.g., 'my-topic') or the full resource path (e.g., 'projects/my-project/topics/my-topic').
Topic Name or Full FormatSelect whether the topic input is a full resource path (e.g., 'projects/my-project/topics/my-topic') or just the topic name (e.g., 'my-topic').
Webhook URLThe URL endpoint to which messages are sent. This is typically the webhook URL of a sibling flow.

Delete Subscription

Deletes an existing subscription.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
SubscriptionThe name of the subscription. Can be either the subscription name (e.g., 'my-subscription') or the full resource path (e.g., 'projects/my-project/subscriptions/my-subscription').
Subscription Name or Full FormatSelect whether the subscription input is a full resource path (e.g., 'projects/my-project/subscriptions/my-subscription') or just the subscription name (e.g., 'my-subscription').

Delete Topic

Deletes the topic with the given name.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
TopicThe name of the topic. Can be either the topic name (e.g., 'my-topic') or the full resource path (e.g., 'projects/my-project/topics/my-topic').
Topic Name or Full FormatSelect whether the topic input is a full resource path (e.g., 'projects/my-project/topics/my-topic') or just the topic name (e.g., 'my-topic').

Get Policy

Gets the access control policy for a resource.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
ResourceThe resource name for which the policy is being requested. See Resource Names for more information.
Requested Policy VersionThe maximum policy version to use for formatting the policy. Valid values are 0, 1, and 3. Policies with conditional bindings must use version 3.

Get Subscription

Gets the configuration details of a subscription.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
SubscriptionThe name of the subscription. Can be either the subscription name (e.g., 'my-subscription') or the full resource path (e.g., 'projects/my-project/subscriptions/my-subscription').
Subscription Name or Full FormatSelect whether the subscription input is a full resource path (e.g., 'projects/my-project/subscriptions/my-subscription') or just the subscription name (e.g., 'my-subscription').

Get Topic

Gets the configuration of a topic.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
TopicThe name of the topic. Can be either the topic name (e.g., 'my-topic') or the full resource path (e.g., 'projects/my-project/topics/my-topic').
Topic Name or Full FormatSelect whether the topic input is a full resource path (e.g., 'projects/my-project/topics/my-topic') or just the topic name (e.g., 'my-topic').

List Subscriptions

Lists matching Subscriptions.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
Fetch AllWhen true, fetches all pages of results using pagination.false
Page TokenThe value returned by the last ListSubscriptionsResponse; indicates that this is a continuation of a prior subscriptions.list call, and that the system should return the next page of data.
Page SizeMaximum number of subscriptions to return.

List Topics

Lists matching topics.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
Fetch AllWhen true, fetches all pages of results using pagination.false
Page TokenThe page token returned by a previous list call to request the next page of results.
Page SizeThe maximum number of results to return per page.

Pull Messages

Pulls messages from the server.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
SubscriptionThe name of the subscription. Can be either the subscription name (e.g., 'my-subscription') or the full resource path (e.g., 'projects/my-project/subscriptions/my-subscription').
Subscription Name or Full FormatSelect whether the subscription input is a full resource path (e.g., 'projects/my-project/subscriptions/my-subscription') or just the subscription name (e.g., 'my-subscription').
Max MessagesThe maximum number of messages to return. Must be a positive integer. Pub/Sub may return fewer messages than specified.
Return ImmediatelyWhen true, the system responds immediately even if no messages are available. Warning: Setting this to true adversely impacts performance and is discouraged.false

Raw Request

Send raw HTTP request to Google Cloud Pub/Sub

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
API VersionThe API version to use for constructing the base URL for requests.v1
URLInput the path only (/projects/{projectId}/topics), The base URL is already included (https://pubsub.googleapis.com/{version}). For example, to connect to https://pubsub.googleapis.com/v1/projects/{projectId}/topics, only /projects/{projectId}/topics is entered in this field.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.
File DataFile Data to be sent as a multipart form upload.
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.
Query ParameterA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
HeaderA list of headers to send with the request.
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Debug RequestEnabling this flag will log out the current request.false
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.false
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.false

Set Gmail IAM Policy for Topic

Configure a topic to allow publish notifications from Gmail.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
TopicThe full name of the topic to set the IAM policy for

Set Policy

Sets the access control policy on the specified resource.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
ResourceThe resource name for which the policy is being requested. See Resource Names for more information.
PolicyThe complete IAM policy to apply to the resource. See Policy for more information.

Update Push Config

This may be used to change a push subscription to a pull one (signified by an empty PushConfig) or vice versa, or change the endpoint URL and other attributes of a push subscription.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
SubscriptionThe name of the subscription. Can be either the subscription name (e.g., 'my-subscription') or the full resource path (e.g., 'projects/my-project/subscriptions/my-subscription').
Subscription Name or Full FormatSelect whether the subscription input is a full resource path (e.g., 'projects/my-project/subscriptions/my-subscription') or just the subscription name (e.g., 'my-subscription').
Push EndpointThe URL endpoint to which messages should be pushed.
AttributesEndpoint configuration attributes for message delivery. The x-goog-version attribute controls the push message format. See Push Delivery for more information.
OIDC TokenConfiguration for generating an OIDC JWT token as an Authorization header for push requests. See Authentication for more information.

Update Subscription

Updates an existing subscription.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
SubscriptionThe name of the subscription. Can be either the subscription name (e.g., 'my-subscription') or the full resource path (e.g., 'projects/my-project/subscriptions/my-subscription').
TopicThe name of the topic from which this subscription is receiving messages. The value of this field will be deleted-topic if the topic has been deleted.
Subscription Name or Full FormatSelect whether the subscription input is a full resource path (e.g., 'projects/my-project/subscriptions/my-subscription') or just the subscription name (e.g., 'my-subscription').
Update MaskComma-separated list of field paths to update. See Field Masks for more information.
Push ConfigConfiguration for push delivery. See PushConfig for more information.
BigQuery ConfigConfiguration for BigQuery delivery. See BigQueryConfig for more information.
Ack Deadline SecondsThe time (in seconds) Pub/Sub waits for acknowledgment before resending the message. Must be between 10 and 600 seconds. Default is 10 seconds if not specified.
Retain Acked MessagesWhen true, acknowledged messages are retained in the subscription's backlog until they fall outside the messageRetentionDuration window. Required for seeking to past timestamps.false
Message Retention DurationThe minimum duration to retain a message after publication. Must be between 10 minutes (600s) and 31 days (2678400s). Format: duration in seconds with up to nine fractional digits, ending with 's' (e.g., '3600s' for 1 hour).
LabelsLabels to organize and group resources. See Creating and Updating Labels for more information.
Enable Message OrderingWhen true, messages with the same orderingKey are delivered to subscribers in the order they are received by Pub/Sub.false
Expiration PolicyPolicy specifying when the subscription expires. Default TTL is 31 days if not set. See ExpirationPolicy for more information.
FilterA filter expression to select which messages are delivered. See Filtering Messages for syntax.
Dead Letter PolicyPolicy for dead lettering undeliverable messages. See Dead Letter Topics for more information.
Retry PolicyPolicy for retrying message delivery. See RetryPolicy for more information.
DetachedWhen true, the subscription is detached from its topic and will not receive messages or retain backlog.false
Enable Exactly Once DeliveryWhen true, Pub/Sub guarantees exactly-once delivery semantics for messages on this subscription.false
Topic Message Retention DurationOutput-only field indicating the minimum duration messages are retained in the topic. Format: duration in seconds ending with 's' (e.g., '86400s').
StateOutput-only field indicating whether the subscription can receive messages.

Update Topic

Updates an existing topic.

InputCommentsDefault
ConnectionThe connection to use for authenticating requests to Google Cloud Pub/Sub.
Project IDThe Google Cloud project ID containing the Pub/Sub resources.
TopicName of the topic
Topic Name or Full FormatSelect whether the topic input is a full resource path (e.g., 'projects/my-project/topics/my-topic') or just the topic name (e.g., 'my-topic').
Update MaskComma-separated list of field paths to update. See Field Masks for more information.
LabelsLabels to organize and group resources. See Creating and Updating Labels for more information.
Message Storage PolicyPolicy constraining the Google Cloud regions where messages may be stored. See Message Storage Policy for more information.
KMS Key NameThe resource name of the Cloud KMS CryptoKey used to protect access to messages published on this topic. See Customer-Managed Encryption Keys for more information.
Schema SettingsSettings for validating messages against a schema. See Schema Settings for more information.
Satisfies PZSWhen true, indicates the topic satisfies physical zone separation. This is an output-only field reserved for future use.false
Message Retention DurationThe minimum duration to retain a message after publication. Must be between 10 minutes (600s) and 31 days (2678400s). Format: duration in seconds with up to nine fractional digits, ending with 's' (e.g., '3600s' for 1 hour).