New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceCore BlocksCommunication & Chat
Block

Discord Block

Interact with Discord

The Discord block connects your workflow to Discord, letting you send messages, read channel history, and look up server and user information. Reach for it to automate notifications, community management, and Discord-driven integrations.

Overview

PropertyValue
Typediscord
Categorytools
Color#E0E0E0

When to Use

  • Post automated notifications or alerts into a Discord channel.
  • Send dynamic, workflow-generated messages to a community server.
  • Pull recent channel messages to feed downstream steps (e.g., summarization or moderation).
  • Fetch server metadata (name, icon, member count, roles, channels) for onboarding or reporting flows.
  • Look up a specific user's profile information by ID.
  • Drive community management automation entirely from workflow logic.

Configuration

Operation

Selects which Discord action to perform. Defaults to discord_send_message.

LabelID
Send Messagediscord_send_message
Get Channel Messagesdiscord_get_messages
Get Server Informationdiscord_get_server
Get User Informationdiscord_get_user

Bot Token

The Discord bot token used to authenticate all requests. Required for every operation. Treat this as a secret — pass it as an environment variable reference (e.g., {{DISCORD_BOT_TOKEN}}).

Server (basic mode) / Server ID (advanced mode)

Identifies the Discord server (guild) to act on.

  • Server (serverId) — use the server selector (basic mode) to pick a server from an OAuth-authorized list. Shown for discord_send_message, discord_get_messages, and discord_get_server.
  • Server ID (manualServerId) — enter the server's snowflake ID directly (advanced mode). Shown for the same three operations.

Both fields resolve to the same parameter at runtime; the block uses whichever is populated.

Channel (basic mode) / Channel ID (advanced mode)

Identifies the Discord channel to read from or write to.

  • Channel (channelId) — use the channel selector (basic mode). Shown for discord_send_message and discord_get_messages.
  • Channel ID (manualChannelId) — enter the channel's snowflake ID directly (advanced mode). Shown for the same two operations.

User ID

The Discord user's snowflake ID. Required for the discord_get_user operation only.

Message Content

The text body to post. Required for discord_send_message. Supports {{blockName.field}} references to inject upstream output.

Message Limit

Maximum number of messages to retrieve for discord_get_messages. Accepts 1–100; defaults to 10.

Inputs & Outputs

  • Inputs:

    • operation (string) — Operation to perform (discord_send_message | discord_get_messages | discord_get_server | discord_get_user)
    • botToken (string) — Discord bot token
    • serverId (string) — Discord server identifier (from server selector)
    • manualServerId (string) — Manual server identifier (snowflake ID entered by hand)
    • channelId (string) — Discord channel identifier (from channel selector)
    • manualChannelId (string) — Manual channel identifier (snowflake ID entered by hand)
    • content (string) — Message content to send
    • limit (number) — Maximum number of messages to retrieve
    • userId (string) — Discord user identifier
  • Outputs:

    • message (string) — Human-readable success or status message
    • data (json) — Full response payload from the Discord API (shape varies by operation — see Tools section below)

Tools

Discord Send Message (discord_send_message) — Posts a text message to a specified channel using the Discord v10 REST API (POST /channels/{channelId}/messages). Requires botToken, serverId, and channelId. The content field is optional; if omitted the tool sends a default placeholder. The data output contains the created message object with fields: id, content, channel_id, author (id, username, avatar, bot), timestamp, edited_timestamp, embeds, attachments, mentions, mention_roles, and mention_everyone.

Discord Get Messages (discord_get_messages) — Retrieves up to 100 recent messages from a channel (GET /channels/{channelId}/messages?limit=N). Requires botToken, serverId, and channelId. The data output contains messages (array of message objects) and channel_id.

Discord Get Server (discord_get_server) — Fetches metadata about a Discord server/guild (GET /guilds/{serverId}). Requires botToken and serverId. The data output contains id, name, icon, description, owner_id, roles, channels, and member_count.

Discord Get User (discord_get_user) — Retrieves a user's profile (GET /users/{userId}). Requires botToken and userId. The data output contains id, username, discriminator, avatar, bot, system, email, and verified.

YAML Example

discord_1:
  type: discord
  name: "Discord"
  inputs:
    operation: "discord_send_message"
    botToken: "{{DISCORD_BOT_TOKEN}}"
    serverId: "123456789012345678"
    channelId: "234567890123456789"
    content: "{{previous_block.output}}"
  connections:
    outgoing:
      - target: next-block-id