Google Cloud Pub/Sub
App · 20 actions
Publish and read messages on Google Cloud Pub/Sub, and manage topics, subscriptions and snapshots. Start a workflow for each new message on a subscription, or when a topic or subscription is created.
Actions
| Action | What it does |
|---|---|
| Acknowledge messages | Mark messages from 'Pull messages' as handled, so Pub/Sub doesn't deliver them again. |
| Check message against schema | Check that a JSON message fits a schema, without publishing it. |
| Create snapshot | Save which messages a subscription has handled, to go back to later with 'Replay or skip messages'. |
| Create subscription | Create a pull subscription that receives every message published to a topic from now on. |
| Create topic | Create a topic to publish messages to. |
| Delete snapshot | Delete a snapshot. |
| Delete subscription | Delete a subscription and the messages waiting on it. |
| Delete topic | Delete a topic. |
| Get subscription | Get a subscription's settings: its topic, deadline, filter and dead-letter topic. |
| Get topic | Get a topic's settings and labels. |
| Give messages more time | Give pulled messages more time before Pub/Sub delivers them again, or set 0 to hand them back now. |
| List schemas | List the message schemas in your project. |
| List snapshots | List the snapshots in your project. |
| List subscriptions | List the subscriptions in your project, or those on one topic. |
| List topics | List the topics in your project. |
| Publish message | Send a message to a topic, for every subscription on it to receive. |
| Pull messages | Read messages waiting on a pull subscription. |
| Replay or skip messages | Move a subscription to a moment or a snapshot: messages published before it count as handled, later ones are delivered again. |
| Update subscription | Change a subscription's settings or add labels. |
| Update topic | Add labels to a topic, or change how long it keeps messages. |
Acknowledge messages
Mark messages from 'Pull messages' as handled, so Pub/Sub doesn't deliver them again.
Inputs
- Subscription
subscriptiontextRequired - The pull subscription to read from. Pick one, or give its name from an earlier step.
- Messages
ack_idslistRequired - The ack_id of each message, from 'Pull messages' (or the pulled messages themselves).
Outputs
acknowledgednumber- How many
subscriptiontext- The subscription's full name
Example output
{
"acknowledged": 1,
"subscription": "projects/acme-prod/subscriptions/orders-lodol"
}Check message against schema
Check that a JSON message fits a schema, without publishing it.
Inputs
- Schema
schematextRequired - The schema to check against.
- Message
messagetextRequired - The message, as JSON.
Outputs
problemtext- Why it doesn't fit, in Pub/Sub's words
schematext- The schema's full name
validtrue/false- Whether the message fits the schema
Example output
{
"problem": "",
"schema": "projects/acme-prod/schemas/order",
"valid": true
}Create snapshot
Save which messages a subscription has handled, to go back to later with 'Replay or skip messages'. Snapshots last at most 7 days.
Inputs
- Name
nametextRequired - The new snapshot's name, such as orders-before-deploy.
- Subscription
subscriptiontextRequired - The subscription. Pick one, or give its name from an earlier step.
- Labels
labelsobject - Labels to give it, such as team: billing. Lowercase letters, numbers, - and _ only.
Outputs
snapshotobject- A snapshot
Example output
{
"snapshot": {
"expire_time": "2026-11-25T09:30:00Z",
"labels": {},
"name": "projects/acme-prod/snapshots/orders-before-deploy",
"snapshot_id": "orders-before-deploy",
"topic": "projects/acme-prod/topics/orders"
}
}Create subscription
Create a pull subscription that receives every message published to a topic from now on.
Inputs
- Name
nametextRequired - The new subscription's name, such as orders-lodol: letters, numbers and - _ . ~ + %, starting with a letter.
- Topic
topictextRequired - The topic. Pick one, or give its name from an earlier step.
- Seconds to acknowledge
ack_deadline_secondsnumber - How long a pulled message has to be acknowledged before Pub/Sub sends it again, 10 to 600 seconds. Pub/Sub's default is 10.From 10 to 600.
- Keep messages for (days)
retention_daysnumber - Keep unacknowledged messages this many days, 1 to 31. Pub/Sub's default is 7.From 1 to 31.
- Only messages where
message_filtertext - A filter on attributes, such as attributes.type = "order". It can't be changed later.
- Message ordering
message_orderingtrue/false - Deliver messages with the same ordering key in the order they were sent.
- Keep acknowledged messages
retain_acked_messagestrue/false - Keep messages after they're acknowledged, so 'Replay or skip messages' can deliver them again.
- Exactly-once delivery
exactly_once_deliverytrue/false - Never send a message again once it's acknowledged, or before its deadline passes.
- Dead-letter topic
dead_letter_topictext - Where to send messages that fail too many times. Pub/Sub's own service account needs permission to publish there.
- Tries before dead-lettering
max_delivery_attemptsnumber - How many tries a message gets first, 5 to 100. Defaults to 5.From 5 to 100.
- Delete when unused for (days)
expires_after_daysnumber - Days with no one reading before Pub/Sub deletes the subscription, or 0 to keep it for good. Pub/Sub's default is 31.From 0 to 365.
- Labels
labelsobject - Labels to give it, such as team: billing. Lowercase letters, numbers, - and _ only.
Outputs
subscriptionobject- A subscription
Example output
{
"subscription": {
"ack_deadline_seconds": 60,
"dead_letter_topic": "",
"delivery_type": "pull",
"detached": false,
"exactly_once_delivery": false,
"expires_after_days": 31,
"filter": "",
"labels": {
"team": "billing"
},
"max_delivery_attempts": 0,
"message_ordering": false,
"message_retention_days": 7,
"name": "projects/acme-prod/subscriptions/orders-lodol",
"retain_acked_messages": false,
"state": "ACTIVE",
"subscription_id": "orders-lodol",
"topic": "projects/acme-prod/topics/orders",
"topic_id": "orders"
}
}Create topic
Create a topic to publish messages to.
Inputs
- Name
nametextRequired - The new topic's name, such as orders: letters, numbers and - _ . ~ + %, starting with a letter.
- Labels
labelsobject - Labels to give it, such as team: billing. Lowercase letters, numbers, - and _ only.
- Keep messages for (days)
retention_daysnumber - Keep published messages this many days (1 to 31) so subscriptions can replay them. Leave empty not to.From 1 to 31.
Outputs
topicobject- A topic
Example output
{
"topic": {
"kms_key_name": "",
"labels": {
"team": "billing"
},
"message_retention_days": 0,
"name": "projects/acme-prod/topics/orders",
"schema": "",
"state": "ACTIVE",
"topic_id": "orders"
}
}Delete snapshot
Delete a snapshot.
Inputs
- Snapshot
snapshottextRequired - The snapshot. Pick one, or give its name from an earlier step.
Outputs
deletedtrue/false- Always true once done
snapshottext- The full name of the snapshot deleted
Example output
{
"deleted": true,
"snapshot": "projects/acme-prod/snapshots/orders-before-deploy"
}Delete subscription
Delete a subscription and the messages waiting on it.
Inputs
- Subscription
subscriptiontextRequired - The subscription. Pick one, or give its name from an earlier step.
Outputs
deletedtrue/false- Always true once done
subscriptiontext- The full name of the subscription deleted
Example output
{
"deleted": true,
"subscription": "projects/acme-prod/subscriptions/orders-lodol"
}Delete topic
Delete a topic. Its subscriptions stay but stop receiving messages.
Inputs
- Topic
topictextRequired - The topic. Pick one, or give its name from an earlier step.
Outputs
deletedtrue/false- Always true once done
topictext- The full name of the topic deleted
Example output
{
"deleted": true,
"topic": "projects/acme-prod/topics/orders"
}Get subscription
Get a subscription's settings: its topic, deadline, filter and dead-letter topic.
Inputs
- Subscription
subscriptiontextRequired - The subscription. Pick one, or give its name from an earlier step.
Outputs
subscriptionobject- A subscription
Example output
{
"subscription": {
"ack_deadline_seconds": 60,
"dead_letter_topic": "",
"delivery_type": "pull",
"detached": false,
"exactly_once_delivery": false,
"expires_after_days": 31,
"filter": "",
"labels": {
"team": "billing"
},
"max_delivery_attempts": 0,
"message_ordering": false,
"message_retention_days": 7,
"name": "projects/acme-prod/subscriptions/orders-lodol",
"retain_acked_messages": false,
"state": "ACTIVE",
"subscription_id": "orders-lodol",
"topic": "projects/acme-prod/topics/orders",
"topic_id": "orders"
}
}Get topic
Get a topic's settings and labels.
Inputs
- Topic
topictextRequired - The topic. Pick one, or give its name from an earlier step.
Outputs
topicobject- A topic
Example output
{
"topic": {
"kms_key_name": "",
"labels": {
"team": "billing"
},
"message_retention_days": 0,
"name": "projects/acme-prod/topics/orders",
"schema": "",
"state": "ACTIVE",
"topic_id": "orders"
}
}Give messages more time
Give pulled messages more time before Pub/Sub delivers them again, or set 0 to hand them back now.
Inputs
- Subscription
subscriptiontextRequired - The pull subscription to read from. Pick one, or give its name from an earlier step.
- Messages
ack_idslistRequired - The ack_id of each message, from 'Pull messages' (or the pulled messages themselves).
- Seconds from now
secondsnumberRequired - How long until Pub/Sub may deliver them again, 0 to 600. 0 hands them back straight away.From 0 to 600.
Outputs
messagesnumber- How many messages
secondsnumber- The new deadline
subscriptiontext- The subscription's full name
Example output
{
"messages": 1,
"seconds": 120,
"subscription": "projects/acme-prod/subscriptions/orders-lodol"
}List schemas
List the message schemas in your project.
Inputs
- How many
limitnumber - The most to return, up to 1,000. Defaults to 100.From 1 to 1000.
Outputs
countnumber- How many schemas were returned
schemaslist- The schemas
Example output
{
"count": 1,
"schemas": [
{
"name": "projects/acme-prod/schemas/order",
"revision_id": "a1b2c3d4",
"schema_id": "order",
"type": "AVRO"
}
]
}List snapshots
List the snapshots in your project.
Inputs
- How many
limitnumber - The most to return, up to 1,000. Defaults to 100.From 1 to 1000.
Outputs
countnumber- How many snapshots were returned
snapshotslist- The snapshots
Example output
{
"count": 1,
"snapshots": [
{
"expire_time": "2026-11-25T09:30:00Z",
"labels": {},
"name": "projects/acme-prod/snapshots/orders-before-deploy",
"snapshot_id": "orders-before-deploy",
"topic": "projects/acme-prod/topics/orders"
}
]
}List subscriptions
List the subscriptions in your project, or those on one topic.
Inputs
- Topic
topictext - Only subscriptions on this topic. Leave empty for all.
- How many
limitnumber - The most to return, up to 1,000. Defaults to 100.From 1 to 1000.
Outputs
countnumber- How many subscriptions were returned
subscriptionslist- The subscriptions
Example output
{
"count": 1,
"subscriptions": [
{
"ack_deadline_seconds": 60,
"dead_letter_topic": "",
"delivery_type": "pull",
"detached": false,
"exactly_once_delivery": false,
"expires_after_days": 31,
"filter": "",
"labels": {
"team": "billing"
},
"max_delivery_attempts": 0,
"message_ordering": false,
"message_retention_days": 7,
"name": "projects/acme-prod/subscriptions/orders-lodol",
"retain_acked_messages": false,
"state": "ACTIVE",
"subscription_id": "orders-lodol",
"topic": "projects/acme-prod/topics/orders",
"topic_id": "orders"
}
]
}List topics
List the topics in your project.
Inputs
- How many
limitnumber - The most to return, up to 1,000. Defaults to 100.From 1 to 1000.
Outputs
countnumber- How many topics were returned
topicslist- The topics
Example output
{
"count": 1,
"topics": [
{
"kms_key_name": "",
"labels": {
"team": "billing"
},
"message_retention_days": 0,
"name": "projects/acme-prod/topics/orders",
"schema": "",
"state": "ACTIVE",
"topic_id": "orders"
}
]
}Publish message
Send a message to a topic, for every subscription on it to receive.
Inputs
- Topic
topictextRequired - The topic. Pick one, or give its name from an earlier step.
- Message
messagetext - The message text, such as JSON. Can be left empty when attributes are given.
- Attributes
attributesobject - Name and value pairs sent with the message, such as type: order. Subscriptions can filter on them.
- Ordering key
ordering_keytext - Messages with the same key, such as a customer ID, arrive in the order they were sent, on subscriptions with message ordering on.
Outputs
message_idtext- The new message's ID
topictext- The full name of the topic it went to
Example output
{
"message_id": "13792847109283",
"topic": "projects/acme-prod/topics/orders"
}Pull messages
Read messages waiting on a pull subscription. They're acknowledged unless you turn that off, so they aren't delivered again.
Inputs
- Subscription
subscriptiontextRequired - The pull subscription to read from. Pick one, or give its name from an earlier step.
- At most
max_messagesnumber - The most messages to read, up to 1,000. Defaults to 10; Pub/Sub may return fewer.From 1 to 1000.
- Acknowledge them
auto_acknowledgetrue/false - Mark the messages handled straight away (on by default). Turn off to acknowledge them in a later step, before the subscription's deadline.Default:
true.
Outputs
acknowledgedtrue/false- Whether the messages were acknowledged
countnumber- How many messages were returned
messageslist- The messages read
Example output
{
"acknowledged": true,
"count": 1,
"messages": [
{
"ack_id": "RVNEUAYWLF1GSFE3GQhoUQ5PXiM_NSAoRRIJB08CKF15MEorQVh0Dk",
"attributes": {
"type": "order"
},
"data": "{\"order_id\": \"A-1001\", \"total\": 42.5}",
"data_encoding": "text",
"delivery_attempt": 0,
"message_id": "13792847109283",
"ordering_key": "",
"publish_time": "2026-11-18T09:30:00.123Z"
}
]
}Replay or skip messages
Move a subscription to a moment or a snapshot: messages published before it count as handled, later ones are delivered again.
Inputs
- Subscription
subscriptiontextRequired - The subscription. Pick one, or give its name from an earlier step.
- To this time
to_timedate and time - Skip everything before this moment, and replay what came after it (only messages the subscription still keeps). Give this or a snapshot.
- To this snapshot
snapshottext - Go back to the state a snapshot saved. Give this or a time.
Outputs
snapshottext- The snapshot it was moved to, if one was given
subscriptiontext- The subscription's full name
timetext- The moment it was moved to, if a time was given
Example output
{
"snapshot": "",
"subscription": "projects/acme-prod/subscriptions/orders-lodol",
"time": "2026-11-18T09:00:00Z"
}Update subscription
Change a subscription's settings or add labels. Fields left empty stay as they are.
Inputs
- Subscription
subscriptiontextRequired - The subscription. Pick one, or give its name from an earlier step.
- Seconds to acknowledge
ack_deadline_secondsnumber - How long a pulled message has to be acknowledged before Pub/Sub sends it again, 10 to 600 seconds. Pub/Sub's default is 10.From 10 to 600.
- Keep messages for (days)
retention_daysnumber - Keep unacknowledged messages this many days, 1 to 31.From 1 to 31.
- Keep acknowledged messages
retain_acked_messagestrue/false - Keep messages after they're acknowledged, so 'Replay or skip messages' can deliver them again.
- Exactly-once delivery
exactly_once_deliverytrue/false - Never send a message again once it's acknowledged, or before its deadline passes.
- Dead-letter topic
dead_letter_topictext - Where to send messages that fail too many times. Pub/Sub's own service account needs permission to publish there.
- Tries before dead-lettering
max_delivery_attemptsnumber - How many tries a message gets first, 5 to 100. Defaults to 5.From 5 to 100.
- Delete when unused for (days)
expires_after_daysnumber - Days with no one reading before Pub/Sub deletes the subscription, or 0 to keep it for good. Pub/Sub's default is 31.From 0 to 365.
- Labels
labelsobject - Labels to add or change, such as team: billing. Lowercase letters, numbers, - and _ only.
Outputs
subscriptionobject- A subscription
Example output
{
"subscription": {
"ack_deadline_seconds": 60,
"dead_letter_topic": "",
"delivery_type": "pull",
"detached": false,
"exactly_once_delivery": false,
"expires_after_days": 31,
"filter": "",
"labels": {
"team": "billing"
},
"max_delivery_attempts": 0,
"message_ordering": false,
"message_retention_days": 7,
"name": "projects/acme-prod/subscriptions/orders-lodol",
"retain_acked_messages": false,
"state": "ACTIVE",
"subscription_id": "orders-lodol",
"topic": "projects/acme-prod/topics/orders",
"topic_id": "orders"
}
}Update topic
Add labels to a topic, or change how long it keeps messages. Fields left empty stay as they are.
Inputs
- Topic
topictextRequired - The topic. Pick one, or give its name from an earlier step.
- Labels
labelsobject - Labels to add or change, such as team: billing. Lowercase letters, numbers, - and _ only.
- Keep messages for (days)
retention_daysnumber - Keep published messages this many days (1 to 31), or 0 to stop keeping them.From 0 to 31.
Outputs
changedtrue/false- False if nothing needed changing, so nothing was sent
topicobject- A topic
Example output
{
"changed": true,
"topic": {
"kms_key_name": "",
"labels": {
"team": "billing"
},
"message_retention_days": 0,
"name": "projects/acme-prod/topics/orders",
"schema": "",
"state": "ACTIVE",
"topic_id": "orders"
}
}