Discord Send Message

Sends 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.

Requirements

This plugin requires a Discord webhook URL:

  1. Open your Discord server SettingsIntegrationsWebhooks
  2. Click New Webhook, choose a channel, and copy the webhook URL
  3. Add DISCORD_WEBHOOK_URL on the Env Vars page

Output

HandleTypeDescription
resultobjectDiscord message send result

The result (accessed as {{ discord_message.* }}) shape:

FieldTypeDescription
successbooleanWhether the message was sent successfully
errorstringError message if success is false

Settings

SettingTypeDescription
contentstringMessage text content. Supports {{ }} bindings.
usernamestringOverride the webhook's display username. Supports {{ }} bindings.
embedsJSONRich embed objects as a JSON array. Supports {{ }} bindings.

Authentication

Env VarDescription
DISCORD_WEBHOOK_URLWebhook URL from Discord server Settings → Integrations → Webhooks

Example

Post an alert when a webhook event fires:

  • 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
  }
]

Webhook Setup

Discord webhooks are channel-specific — each webhook URL posts to one channel. To send to multiple channels, create separate webhooks or use multiple Discord Send Message nodes with different DISCORD_WEBHOOK_URL values stored as workflow-level env vars.

To create a webhook:

  1. Open Discord server Settings
  2. Go to IntegrationsWebhooks
  3. Click New Webhook
  4. Name the webhook, select the target channel, and copy the URL

AI Agent Tool

Connect this node to an AI Agent as a tool. The agent can post Discord notifications on your behalf using dynamic values from the conversation context.

Common Gotchas

  • One channel per webhook: A webhook URL is tied to a single channel. Create additional webhooks for other channels.
  • 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 API docs.
  • Check discord_message.success: Connect the On Error branch or add an If node to handle send failures.

See Also

On this page