List Pinned Messages
discord.list_pinned_messages
ActionChat & messagingconnection required
Calls the Discord API with the connection's credentials.
List the messages pinned in a channel, most recently pinned first.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Discord
- Secret shape
- the bot token (sent as "Authorization: Bot <token>") for every op except discord.execute_webhook, whose secret is the webhook URL
- Resolved by
- config.connection_id, else node.connection_id
Configuration
3 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
channel_id Id of the Discord channel (right-click the channel → Copy Channel ID). | string | Yes | — | — | — |
limit How many pins to return, 1-50. | number | No | 50 | 1–50 | — |
before Return pins pinned before this ISO-8601 timestamp; pass the 'next_before' from the previous page to page through. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"limit": 50
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
items The pins, each a {pinned_at, message} object rather than a bare message. | array | — |
count How many pins came back in this page. | number | — |
has_more True when Discord has further pins to give. | boolean | — |
next_before Pass this back as 'before' to fetch the next page; null on the last one. | string | — |
{
"count": 0,
"has_more": false,
"items": [],
"next_before": ""
}Notes
- Needs a Discord connection whose secret is the bot token.
- Needs VIEW_CHANNEL, and READ_MESSAGE_HISTORY or Discord returns no pins at all rather than an error.
- Discord caps a page at 50: when has_more is true, feed next_before back into 'before' to read the rest.
See List Pinned Messages run in a workflow.
In a technical demo we add the Discord connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.