Discord Send Message
Send messages to Discord channels via webhook from a workflow. Use it for notifications, alerts, and bot-style messages without managing a full Discord bot connection.
Use Discord Send Message when:
- You need to post alerts or notifications to a Discord channel from a workflow
- You want rich embed messages with titles, descriptions, and colors
- You need a lightweight integration using a channel webhook (no bot token required)
- An AI Agent should post Discord notifications as a tool
Each webhook URL is tied to one channel. Create additional webhooks for other channels.
| Handle | Type | Description |
|---|---|---|
input | any | Upstream data for template expression references in settings bindings. |
| Handle | Type | Description |
|---|---|---|
result | object | Discord message send result |
The result (accessed as {{ discord_message.* }}) shape:
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the message was sent successfully |
error | string | Error message if success is false |
{
"success": true,
"error": null
}
| Setting | Type | Default | Description |
|---|---|---|---|
content | code editor | — | Message content. Required. Supports template expression bindings. Discord has a 2000-character limit. |
username | string | — | Override the webhook's display username. Optional. Supports template expression bindings. |
embeds | code editor (JSON) | — | Rich embed objects as a JSON array. Optional. Supports template expression bindings. |
Configure on the Env Vars page:
| Env Var | Description |
|---|---|
DISCORD_WEBHOOK_URL | Webhook URL from Discord server Settings → Integrations → Webhooks. See Discord webhook docs for setup instructions. |
To create a webhook:
- Open Discord server Settings
- Go to Integrations → Webhooks
- Click New Webhook, select the target channel, and copy the URL
Post an alert when a webhook event fires:
Webhook Trigger → Discord Send Message
Discord Send Message settings:
- Content:
New order received: #{{ webhook.body.orderId }} - Username:
Order Bot
Send a rich embed notification:
- Content: (leave empty)
- Embeds:
[
{
"title": "Deployment Complete",
"description": "Service `api-gateway` deployed successfully.",
"color": 3066993
}
]
Access the result in downstream nodes:
{{ discord_message.success }}
{{ discord_message.error }}
import webhook from @tensorify/webhook-trigger:4.0.0
import discord from @tensorify/discord-send-message:1.0.0
node trigger @tensorify/webhook-trigger:4.0.0 {
provider = "generic"
path = "/orders"
method = "POST"
}
node notify @tensorify/discord-send-message:1.0.0 {
content = "New order received: #{{ webhook.body.orderId }}"
username = "Order Bot"
}
trigger.payload -> notify.input
Discord Send Message has an On Error control output branch. Enable it via the "Error output handle" toggle at the bottom of the settings panel.
The error branch fires when:
- The Discord webhook API returns an error (invalid URL, rate limit, etc.)
DISCORD_WEBHOOK_URLis missing or invalid- Embed JSON is malformed or fails Discord validation
- Message content exceeds the 2000-character limit
Connect the error output to a fallback notification or If node. On the success path, check {{ discord_message.success }} — the node does not automatically stop execution on failure.
- One channel per webhook: A webhook URL is tied to a single channel. Create additional webhooks for other channels, or use separate env vars per channel.
- Content length limit: Discord webhooks have a 2000-character limit for message content.
- Embed validation: Invalid embed JSON causes the send to fail. Validate your embed structure against the Discord embed object docs.
- Check
discord_message.success: Connect the On Error branch or add an If node to handle send failures. - Missing
DISCORD_WEBHOOK_URL: The node fails at runtime if the env var is not set.
- Discord Trigger — receive Discord events
- AI Agent — use Discord Send Message as an agent tool
- Slack Send Message — Slack notifications
- Environment Variables — store your webhook URL
