Edit Message
discord.edit_message
ActionChat & messagingconnection required
Calls the Discord API with the connection's credentials.
Change the text or embeds of a message the bot posted.
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, 2 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 | — | — | — |
message_id Id of the message to act on (right-click the message → Copy Message ID). | string | Yes | — | — | — |
content Message text, up to 2000 characters. Supports {{ }} expressions. | string | No | — | ≤ 2000 characters | — |
embeds Discord embeds as a JSON array of at most 10 embed objects, each with any of title, description, url, color, footer, image, author and fields. | array | No | — | array of object | — |
allowed_mentions Which mentions may actually ping, as a JSON object — {"parse": []} suppresses every @everyone and @role ping in the message. | object | No | — | — | {"parse":[]} |
- At least one of content, embeds must be set.
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"allowed_mentions": {
"parse": []
}
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id Id of the message. | string | — |
channel_id Channel the message is in. | string | — |
content The message text. | string | — |
timestamp When the message was sent (ISO-8601). | string | — |
edited_timestamp When it was last edited, if ever. | string | — |
pinned True when the message is pinned in its channel. | boolean | — |
author.id Id of the account that posted it. | string | — |
author.username Username of the account that posted it. | string | — |
embeds The embeds attached to the message. | array | — |
attachments The files attached to the message. | array | — |
{
"attachments": [],
"author": {
"id": "",
"username": ""
},
"channel_id": "",
"content": "",
"edited_timestamp": "",
"embeds": [],
"id": "",
"pinned": false,
"timestamp": ""
}Notes
- Needs a Discord connection whose secret is the bot token.
- Only the account that posted a message can edit it; a message sent by discord.send_message belongs to the webhook, not the bot.
See Edit Message 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.