View as Markdown
QStash icon

QStash ACTION

Publish Topic Message

Publish a message to a topic
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's QStash account once, then configure and run Publish Topic Message from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "qstash-publish-topic-message",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    qstash: { authProvisionId: "apn_xxxxxxx" },
    topic: "QStash Topic",
    body: "Body",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Publish Topic Message inputs
Property Type Description
topic QStash Topic string
The QStash topic to publish a message to.
Required Dynamic
body Body object
The body is forwarded to your endpoints in the HTTP request
Required
retries Retries integer
How often should this messasge be retried in case the destination API is not available.
Optional
deduplicationId Deduplication ID string
Provide an ID that will be used to detect duplicate messages. If a duplicate message is detected, the request will be accepted but not enqueued. Learn more.
Optional
contentBasedDeduplicationEnabled Content Based Deduplication Enabled boolean
If true, the message content will get hashed and used as deduplication ID. If a duplicate message is detected, the request will be accepted but not enqueued.
Optional
delay Delay string
Format for this header is a number followed by duration abbreviation, like 10s. Available durations are s (seconds), m (minutes), h (hours), d (days).
Optional
cron Cron string
You can use a tool like Crontab.guru to generate cron expressions.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
qstash-publish-topic-message
Version
0.0.2
App
QStash
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes