FluxyAPIFluxyAPI
BlocksDiscord

Send Discord Webhook

Send automated messages, embeds, and structured data to Discord channels using webhooks.

The Send Discord Webhook block allows you to send automated messages to a Discord channel without needing a full bot. Webhooks are perfect for notifications, logging, or sharing data from your workflows directly into Discord.

Core Concept

Think of a Webhook as a one-way digital mail slot. You have a special URL (the mail slot address) that belongs to a specific Discord channel. When you "drop" a message into that URL, it immediately appears in the channel.

Webhook Setup

To use this block, you first need to create a webhook in your Discord Channel Settings under Integrations > Webhooks.

Configuration

FieldRequiredDescription
Webhook URLThe secret variable containing your Discord Webhook URL.
Webhook NameOverrides the default name of the webhook for this specific message.
Webhook IconA URL to an image to override the webhook's avatar.
Await Discord ResponseIf enabled, the flow will wait for Discord to confirm receipt before moving to the next block.
Advanced Json BuilderToggle this to use a raw JSON object for the message instead of the visual builder.
Webhook ContentUse the visual builder to create messages with text and embeds, or provide a JSON object if Advanced mode is active.
Security First

Always store your Webhook URL in a Secret Variable. Never paste the raw URL directly into the field to prevent accidental exposure.

Variable Syntax Rules

  • Use {variable_name} to include dynamic data in your messages.
  • Access request data using {request.body.field} or {request.query.field}.
  • Global library variables can be accessed via {MY_VAR}.

Error Handling

  • FIELD_MISSING — Triggered if the Webhook URL or Content is missing.
  • SECRET_RETRIEVE_ERROR — Triggered if the system fails to fetch the URL from your secrets.
  • INVALID_WEBHOOK_URL — Triggered if the provided URL does not match the Discord webhook format.
  • EMPTY_PAYLOAD — Triggered if no message content or embed data is provided.
  • WEBHOOK_SEND_FAILED — Triggered if the message fails to send due to network issues.
  • DISCORD_ERROR_[code] — Triggered when Discord returns a specific API error (e.g., 404 if the webhook was deleted).

Example

  1. Create a Secret: Save your Discord Webhook URL as a secret named DISCORD_LOGS_URL.
  2. Setup Block:
    • Webhook URL: Select {SEC_DISCORD_LOGS_URL}.
    • Webhook Content: Enter "New user registered: {request.body.email}".
  3. Result: Whenever the flow runs, a message like "New user registered: [email protected]" will appear in your Discord channel.

On this page