Discord

Sends data to Discord

Message → Send a Message

AI-generated

Summary

Send a message to a Discord channel or directly to a user via Bot Token, OAuth2, or Webhook authentication.

Inputs

  • Connection Type (required) — Select the authentication mode from Bot Token, OAuth2, or Webhook.
  • Server (guildId) (required) — Select the Discord server (guild) by name, ID, or URL for Bot Token or OAuth2 authentication.
  • Send To (required) — Choose to send the message to a channel or as a direct message to a user.
  • User (userId) — Select the user by name or ID to send a direct message; shown only when sending to user.
  • Channel (channelId) (required) — Select the channel by name, ID, or URL to send the message; shown only when sending to channel.
  • Message Content (required) — Specify the text content of the message, up to 2000 characters.
  • Options — Optional settings such as text-to-speech, message flags, username and avatar overrides (mostly for webhook authentication), and whether to wait for the message creation before returning.
  • Embeds — Add one or more embed objects to enrich the message with rich content (title, description, color, images, links, etc.).
  • Files — Attach one or multiple files by specifying binary input fields to include with the message.

Output shape

a single record representing the sent message with details returned by Discord's API, including message ID and content

The response includes message data if the execution is set to wait until message creation; otherwise, it returns immediately after sending. The operation requires appropriate permissions and valid authentication. The server (guildId) input is not required for webhook authentication since it targets a specific channel via the webhook URL.

Examples

Example 1: Send a text message to a specific channel on a Discord server using a bot token.

Set Connection Type to Bot Token, select the Server (guildId) and Channel (channelId), enter the Message Content, and optionally enable text-to-speech or add embeds.

Example 2: Send a direct message to a specific user using OAuth2 authentication.

Set Connection Type to OAuth2, select the Server, choose 'User' for Send To, select the User (userId), enter the Message Content.

Example 3: Send a message via a Webhook without specifying a server or user.

Set Connection Type to Webhook, enter the webhook URL and message content, with optional username or avatar overrides.

Links

Discussion