Google Pub/Sub icon

Google Pub/Sub

Consume Google Pub/Sub API (v.0.3.11)

Actions4

Overview

This node interacts with Google Cloud Pub/Sub to pull messages from a specified subscription. It is useful for scenarios where you need to retrieve messages from a Pub/Sub subscription for processing or integration workflows. For example, it can be used to fetch notifications, event data, or any messages published to a topic that the subscription listens to.

Use Case Examples

  1. Pulling up to 10 messages from a Pub/Sub subscription to process them in a workflow.
  2. Automatically acknowledging messages after pulling to prevent re-delivery.
  3. Decoding JSON message data automatically for easier handling in subsequent nodes.

Properties

Name Meaning
Project ID Google Cloud project id where the Pub/Sub subscription exists.
Subscription Name of the Google Pub/Sub subscription to pull messages from.
Maximum Messages Maximum number of messages to pull in one request.
Allow Excess Messages Whether to allow pulling more messages than the specified maximum.
Acknowledge Messages Whether to acknowledge the received messages automatically after pulling.
Decode JSON If enabled, automatically decode the message data from JSON format.

Output

JSON

  • receivedMessages - Array of messages received from the subscription, each containing message data and metadata.
  • count - Number of messages received (only for streaming pull).
  • success - Indicates successful operation when no messages are returned.

Dependencies

  • Google Cloud Pub/Sub API
  • Google Auth Library

Troubleshooting

  • Ensure valid Google API credentials are provided; missing credentials will cause errors.
  • Subscription name must be correct and accessible within the specified project.
  • If decoding JSON is enabled, message data must be valid JSON to avoid parsing errors.
  • Acknowledging messages requires proper permissions; lack of permissions will cause failures.

Links

Discussion