List Messages
discord.list_messages
ActionChat & messagingconnection required
Calls the Discord API with the connection's credentials.
List recent messages in a channel, newest 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
5 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 messages to return, 1-100. | number | No | 50 | 1–100 | — |
before Return messages posted before this message id. | string | No | — | — | — |
after Return messages posted after this message id. | string | No | — | — | — |
around Return messages posted around this message id. | 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 objects Discord returned, in its own order. | array | — |
count How many objects came back in this page. | number | — |
{
"count": 0,
"items": []
}Notes
- Needs a Discord connection whose secret is the bot token.
- Discord caps a page at 100; page with 'before' using the id of the oldest message you got back.
- Discord rate limits per route: a 429 is reported with the retry_after it asked for, so pace a loop over this node with control.delay.
See List 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.