Actions53
- Message Actions
- Channel Actions
- Thread Actions
- Reaction Actions
- Guild (Server) Actions
- Member Actions
- Role Actions
- Voice Actions
- DM Actions
- Webhook Actions
- Invite Actions
Overview
This node interacts with the Discord API to perform various operations related to Discord webhooks, specifically sending messages via webhooks. It allows users to send messages to Discord channels using webhooks, supporting additional fields such as embeds, text-to-speech, and message attachments. This node is useful for automating message sending in Discord channels, for example, sending notifications, alerts, or updates via webhooks.
Use Case Examples
- Sending a message to a Discord channel via a webhook with an embed object to format the message content.
- Sending a text-to-speech message through a webhook to a Discord channel.
- Attaching a file to a webhook message either from binary data or a URL.
Properties
| Name | Meaning |
|---|---|
| additionalFields | Optional additional fields to customize the webhook message, including embed JSON, TTS flag, reason for action, and other Discord-specific message options. |
Output
JSON
id- ID of the sent webhook message.content- Content text of the sent message.channelId- ID of the channel where the message was sent.createdTimestamp- Timestamp when the message was created.authorid- ID of the author (webhook) who sent the message.username- Username of the author (webhook).
Dependencies
- Discord API accessed via discord.js library
- An API key credential for Discord bot authentication
Troubleshooting
- Invalid embed JSON error: Ensure the embed JSON is correctly formatted and valid JSON syntax is used.
- Channel not found or not text-based error: Verify the channel ID is correct and the channel supports text messages.
- No binary data property found error: Confirm the binary property name matches the input binary data property.
- Authentication errors: Check that the Discord bot token credential is valid and has necessary permissions.
Links
- discord.js WebhookClient Documentation - Official documentation for sending messages via Discord webhooks using discord.js library.
- Discord Webhook API Documentation - Official Discord API documentation for webhooks, describing message sending and webhook management.