Create Message

discord.create_message
ActionChat & messagingconnection required

Calls the Discord API with the connection's credentials.

Post a message to a channel as the bot, optionally as a reply.

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

6 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
channel_id
Id of the Discord channel (right-click the channel → Copy Channel ID).
stringYes———
content
Message text, up to 2000 characters. Supports {{ }} expressions.
stringNo—≤ 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.
arrayNo—array of object—
reply_to_message_id
Id of a message in the same channel to reply to.
stringNo———
tts
Read the message aloud for members with TTS on.
booleanNo———
allowed_mentions
Which mentions may actually ping, as a JSON object — {"parse": []} suppresses every @everyone and @role ping in the message.
objectNo——{"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

FieldTypeExample
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.
  • Unlike discord.send_message (a webhook), a message posted here belongs to the bot, so discord.edit_message and discord.delete_message can act on it.
  • 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 Create 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.