Skip to content

Discord

This module allows interaction with the Discord API v10 through two mechanisms: Webhooks and Bot Token. Webhook operations (sending messages and embeds) do not require bot credentials, only the webhook URL. Bot operations require a bot token configured in the credentials and allow managing channel messages, direct messages, reactions, threads, roles, members and servers.

The operation is determined by the operation field or by the node name (node_name_alias). The module supports over 20 different operations organized into: webhook, channel messages, direct messages, server (guild) management, users and threads.

ParameterTypeRequiredDescription
credentials_idcredentialsNoDiscord bot credentials (not required for webhooks)
operationselectYesOperation to perform: webhookSend, webhookEmbed, sendMessage, sendEmbed, sendDM, getMessages, addReaction, getGuild, getMembers, addRole, removeRole, etc.
webhookUrltextConditionalDiscord webhook URL (required for webhook operations)
channelIdtextConditionalDiscord channel ID
guildIdtextConditionalDiscord server ID
userIdtextConditionalDiscord user ID
messageIdtextConditionalMessage ID
contenttextConditionalText message content
embedjsonNoComplete embed object or individual fields (embedTitle, embedDescription, embedColor, etc.)
threadNametextConditionalThread name (for createThread)
roleIdtextConditionalRole ID (for addRole/removeRole)

Service type: discord. Stored in the servicecredentials table.

Configuration fields:

  • botToken: Discord bot token (required for bot operations)
  • defaultGuildId: Default server ID (optional)

For webhook operations only the webhook URL is needed, no credentials are required.

{
"nextModule": "siguiente_modulo",
"data": {
"sentMessage": {
"id": "1234567890",
"channel_id": "9876543210",
"content": "Hola desde Floogos",
"timestamp": "2025-01-15T10:30:00.000Z"
}
},
"_meta_": {
"operation": "sendMessage",
"service": "discord"
}
}
{
"webhookUrl": "https://discord.com/api/webhooks/123/abc",
"content": "Alerta: nuevo pedido recibido",
"username": "Bot de Pedidos"
}
{
"credentials_id": 1,
"operation": "sendMessage",
"channelId": "123456789",
"content": "Mensaje desde el workflow"
}
  • Webhook operations do not require bot credentials
  • Embeds can be built field by field (embedTitle, embedDescription, embedColor) or as a complete JSON object
  • The embed color is specified in hexadecimal (e.g.: “5865F2”) and is converted to an integer internally
  • Title buttons are limited to 20 characters by Discord
  • The continueOnError parameter allows the workflow to continue even if the operation fails
  • Direct messages (DM) automatically create a DM channel with the user before sending
  • Discord Webhook Send (parentNode: discord)
  • Discord Webhook Embed (parentNode: discord)
  • Discord Send Message, Send Embed, Send DM, Edit Message, Delete Message
  • Discord Get Messages, Add Reaction, Get Guild Info, Get Channels, Get Members
  • Discord Add Role, Remove Role, Ban User, Kick User, Create Thread, Get User