Menu

Mattering Automations Discord integration

Connect Discord to Mattering Automations: messages, channels, threads, pins, reactions, roles, server members, bans, invites, and webhooks as workflow steps, authenticated with a Discord bot token sent as Authorization: Bot.

The Mattering Automations Discord integration adds 66 Discord nodes to your automation canvas, generated from the Discord HTTP API v10. They cover messages (send, edit, pin, publish, bulk delete, search), channels and permission overwrites, invites, threads and thread membership, reactions, roles, server members, kicks and bans, servers and emojis, users and direct messages, and webhooks.

Setup has three parts, and skipping the third is the most common reason nothing works: create a Discord application and a bot, invite that bot to your server with the permissions your workflows need, then attach the bot token as a credential in Mattering. This guide walks through each part, shows how to verify the connection, and ends with the full node reference and the failure modes that actually come up.

Before you start

  • A Discord account and permission to create an application at discord.com/developers/applications. Applications, bots, and the HTTP API are free.
  • A Discord server where you have Manage Server, so you can invite the bot. The bot cannot read or write anywhere it has not been added, and there is no way around that from Mattering's side.
  • A decision about permissions before you build the invite link. Grant the bot only what your workflows need, for example Manage Channels for channel nodes, Manage Messages for pins and deletes, Manage Roles for role assignment, Kick Members and Ban Members for moderation, and Manage Webhooks for the webhook nodes.
  • A Mattering workspace with access to the Automations app.

Create a Discord bot token

Mattering authenticates to Discord with a bot token, sent as Authorization: Bot followed by the token. That literal Bot prefix is what Discord requires for bot tokens; Bearer is only for end-user OAuth2 tokens. The connector ships a dedicated Discord Bot Token credential type so the form and the auth test both send the right thing.

Open the Discord Developer Portal at discord.com/developers/applications and click New Application, or open an application you already own.
In the sidebar, open Bot. If the application has no bot yet, add one here.
Click Reset Token and copy the token that appears.
Discord shows a bot token once. If you leave the page without copying it, your only option is Reset Token again, which invalidates the previous value and breaks anything already using it.
Still on the Bot page, turn on the privileged gateway intents your nodes need: Server Members Intent for Discord: List Server Members and Discord: List Thread Members, and Message Content Intent for Discord: Search Server Messages.
Intents are off by default. Without them those three nodes fail at Discord with a 403, no matter how good the token is. If your application is in more than 100 servers, Discord also has to approve the intent before you can enable it.
Open OAuth2 > URL Generator, tick the bot scope, tick the permissions your workflows need, then open the generated URL and add the bot to your server.

Connect Discord to Mattering

In Mattering Automations, open Connectors and click Add Connector.
Choose Discord from the list.
Click Create new credential, paste the bot token into the Bot Token field, and save.
Use the Discord Bot Token credential type, not a generic bearer credential. Discord bot tokens must be sent as Authorization: Bot <token>. A bot token sent as Bearer returns 401 on every single route, which reads like a bad token when the token is fine.
You can paste the raw token. If you paste it with a Bot or Bearer prefix already attached, the connector strips it so the header never doubles up. The credential is stored encrypted in Google Secret Manager and never appears in workflow logs.
Click Test Connection: Mattering calls Discord's current-user endpoint with the Bot prefix and reports the bot username it authenticated as.
Click Connect. All 66 Discord nodes appear in your canvas palette.

Verify it works

Open any automation canvas and check the palette: a Discord section should list the query and action nodes. Drop Discord: Get Bot User onto the canvas and run a test step. It takes no arguments at all and is a safe, read-only call, so a successful response returns the bot user your token belongs to. A 401 here means the credential is wrong, and the usual cause is a bot token sent as Bearer.

That first check proves the token, not the invite. Run Discord: List Bot Servers next: it returns the servers the bot is actually a member of. If your server is missing, the bot was never invited, or it was invited to a different server, and every server-scoped node will fail until you fix that. Copy the server id from the result.

Finally, prove the bot can see a channel. Run Discord: List Server Channels with that server id to get channel ids, then Discord: List Channel Messages on one of them. A successful response returns recent messages, which means the token, the invite, and the channel permissions all line up.

To read ids straight out of the Discord client instead, turn on Developer Mode under User Settings > Advanced. Right-clicking a server, channel, message, or member then offers Copy ID.

Node reference

66 nodes, generated from the connector itself so this reference always matches what ships.

Read and query nodes 27

Discord: Get Bot User

discord_get_current_user

Get the bot user the connector's token belongs to. Takes no parameters, so it doubles as the connector's auth check.

Discord: Get Channel

discord_get_channel

Get one channel or thread by id.

Discord: Get Message

discord_get_message

Get a single message by id, including its reactions and embeds.

Discord: Get Server

discord_get_guild

Get a server by id, including its roles and features.

Discord: Get Server Ban

discord_get_guild_ban

Check whether one user is banned. Returns the ban with its reason, or 404 when the user is not banned.

Discord: Get Server Member

discord_get_guild_member

Get one member's server profile: nickname, roles, join date and timeout state.

Discord: Get Server Preview

discord_get_guild_preview

Get the public preview of a server. Works when the bot is a member, or for any server that has Discovery enabled.

Discord: Get Server Role

discord_get_guild_role

Get one role by id.

Discord: Get User

discord_get_user

Get a Discord user by id. Returns the global user, not their server profile.

Discord: Get Webhook

discord_get_webhook

Get one webhook by id, using the bot token. Requires Manage Webhooks.

Discord: List Active Threads

discord_list_active_threads

List every active (not archived) thread in a server that the bot can see.

Discord: List Archived Threads

discord_list_public_archived_threads

List a channel's public archived threads, newest archive first. Requires Read Message History.

Discord: List Bot Servers

discord_list_current_user_guilds

List the servers the bot is a member of, as partial guild objects.

Discord: List Channel Invites

discord_list_channel_invites

List the invites that point at a channel. Requires Manage Channels.

Discord: List Channel Messages

discord_list_messages

Read messages from a channel, newest first. around, before and after are mutually exclusive, pass only one.

Discord: List Channel Webhooks

discord_list_channel_webhooks

List a channel's webhooks. The response includes each webhook's token, so treat this node's output as secret.

Discord: List Pinned Messages

discord_list_pins

List a channel's pinned messages, newest pin first. Page with before, using the last pinned_at value you received.

Discord: List Reaction Users

discord_list_reactions

List the users who reacted to a message with one emoji.

Discord: List Server Bans

discord_list_guild_bans

List the users banned from a server. Requires Ban Members.

Discord: List Server Channels

discord_list_guild_channels

List every channel in a server. Threads are not included.

Discord: List Server Emojis

discord_list_guild_emojis

List a server's custom emojis. Use the returned name and id as name:id when adding a reaction.

Discord: List Server Members

discord_list_guild_members

List a server's members, ordered by user id. Requires the Server Members privileged intent, which you enable on the app's Bot page.

Discord: List Server Roles

discord_list_guild_roles

List every role in a server, with its permission bitfield and position.

Discord: List Server Webhooks

discord_list_guild_webhooks

List every webhook in a server. The response includes webhook tokens, so treat this node's output as secret.

Discord: List Thread Members

discord_list_thread_members

List the members of a thread. Needs the Server Members privileged intent. Set with_member to true to get full member objects and paginated results.

Discord: Search Server Members

discord_search_guild_members

Find server members whose username or nickname starts with a string.

Discord: Search Server Messages

discord_search_guild_messages

Search a server's message history. Needs the Message Content privileged intent enabled on the app. An unindexed server answers 202 with a retry_after instead of results.

Action nodes 39

Discord: Add Member to Thread

discord_add_thread_member

Add a user to a thread. The bot must be able to send messages in it.

Discord: Add Reaction

discord_add_reaction

React to a message as the bot. Needs Read Message History, plus Add Reactions when nobody has used that emoji on the message yet.

Discord: Add Role to Member

discord_add_member_role

Give one role to a member, leaving their other roles alone. Requires Manage Roles, and the bot's own highest role must sit above the role being granted.

Discord: Ban Member

discord_create_guild_ban

DESTRUCTIVE: ban a user from the server and optionally delete their recent messages. Requires Ban Members. Reversible only by an explicit unban, and deleted messages do not come back.

Discord: Bulk Delete Messages

discord_bulk_delete_messages

DESTRUCTIVE: permanently delete 2 to 100 messages in one call. Guild channels only, requires Manage Messages, and Discord rejects the whole batch if any message is older than 2 weeks or repeated. This cannot be undone.

Discord: Clear All Reactions

discord_delete_all_reactions

DESTRUCTIVE: remove every reaction from a message, from every user and every emoji at once. Requires Manage Messages and cannot be undone.

Discord: Clear Reactions for One Emoji

discord_delete_emoji_reactions

DESTRUCTIVE: remove every user's reaction of one emoji from a message. Requires Manage Messages and cannot be undone.

Discord: Create Channel

discord_create_guild_channel

Create a channel in a server. Requires the Manage Channels permission.

Discord: Create Channel Invite

discord_create_channel_invite

Create an invite link for a channel. Requires the Create Invite permission. Every field is optional; the defaults give a 24 hour, unlimited-use invite.

Discord: Create Role

discord_create_guild_role

Create a role. Every field is optional; with none set you get a role named new role with the same permissions as everyone.

Discord: Create Webhook

discord_create_webhook

Create a webhook on a channel and return it with its token. Requires Manage Webhooks. Store the returned token as a secret.

Discord: Delete Channel

discord_delete_channel

DESTRUCTIVE: permanently delete a channel and every message in it. Deleting a category does not delete its child channels. This cannot be undone.

Discord: Delete Message

discord_delete_message

DESTRUCTIVE: permanently delete one message. Deleting somebody else's message requires Manage Messages. This cannot be undone.

Discord: Delete Role

discord_delete_guild_role

DESTRUCTIVE: delete a role. Every member loses it and every channel permission overwrite that referenced it goes with it. This cannot be undone.

Discord: Delete Webhook

discord_delete_webhook

DESTRUCTIVE: delete a webhook using the bot token. Anything still posting to that webhook URL breaks immediately, and the URL cannot be recovered.

Discord: Delete Webhook Message

discord_delete_webhook_message

DESTRUCTIVE: permanently delete a message this webhook sent. This cannot be undone.

Discord: Edit Message

discord_edit_message

Edit a message. Only the original author can change content, embeds and components. Every field is optional; sending content replaces the whole text.

Discord: Edit Webhook Message

discord_edit_webhook_message

Edit a message that this webhook previously sent. The webhook token authorizes the call, so no bot token is sent.

Discord: Join Thread

discord_join_thread

Add the bot to a thread. The thread must not be archived.

Discord: Kick Member

discord_remove_guild_member

DESTRUCTIVE: remove a member from the server. They lose their roles and nickname, and can rejoin only with a new invite. Requires Kick Members.

Discord: Leave Thread

discord_leave_thread

Remove the bot from a thread.

Discord: Open Direct Message

discord_create_dm

Open (or reuse) a direct message channel with one user and return the channel. Feed the returned id into Discord: Send Message to DM someone.

Discord: Pin Message

discord_pin_message

Pin a message in a channel. Requires the Pin Messages permission.

Discord: Publish Announcement Message

discord_crosspost_message

Publish a message in an announcement channel so it reaches every server following that channel.

Discord: Remove Bot Reaction

discord_delete_own_reaction

Remove the bot's own reaction from a message.

Discord: Remove Channel Permission Overwrite

discord_delete_channel_permission

Remove a role or member permission overwrite from a channel, so the channel falls back to server defaults.

Discord: Remove Member from Thread

discord_remove_thread_member

Remove a user from a thread. Requires Manage Threads on public threads.

Discord: Remove Role from Member

discord_remove_member_role

Take one role away from a member, leaving their other roles alone.

Discord: Remove User Reaction

discord_delete_user_reaction

Remove one specific user's reaction from a message. Requires Manage Messages.

Discord: Send Message

discord_send_message

Post a message to a channel, thread or DM channel. At least one of content, embeds, components or sticker_ids is required. File attachments are not supported by this node.

Discord: Send Webhook Message

discord_execute_webhook

Post a message through a channel webhook URL, with a custom display name and avatar. The webhook token is the credential here, so no bot token is sent. Set wait to true if you need the created message back.

Discord: Set Channel Permission Overwrite

discord_edit_channel_permissions

Set the permission overwrite for one role or member on a channel. Requires Manage Roles, and the bot can only grant permissions it already holds.

Discord: Start Thread

discord_start_thread

Start a thread that is not attached to a message. Set type to 11 for a public thread or 12 for a private one; Discord still defaults to private when type is omitted.

Discord: Start Thread on Message

discord_start_thread_from_message

Start a thread hanging off an existing message. The new thread id equals the source message id, so a message can only ever have one thread. Does not work in forum or media channels.

Discord: Unban User

discord_remove_guild_ban

Lift a ban so the user can rejoin with a fresh invite. Requires Ban Members.

Discord: Unpin Message

discord_unpin_message

Unpin a message. The message itself is untouched, only the pin is removed.

Discord: Update Channel

discord_modify_channel

Update a channel or thread. Every field is optional, send only what should change. Thread-only fields (archived, locked, auto_archive_duration, applied_tags) are ignored on normal channels.

Discord: Update Role

discord_modify_guild_role

Update a role. Send only the fields that should change.

Discord: Update Server Member

discord_modify_guild_member

Update a member: nickname, their whole role list, voice state, or a timeout. Note that roles REPLACES the member's roles, it does not add to them; use Discord: Add Role to Member for that.

Using the integration

On the automation canvas

Discord nodes chain with every other node: a message read from a channel can become an assigned task in Mattering Productivity, an AI step can summarize or classify it, a condition can route it, and Discord: Send Message can post the result back. Ten nodes are marked destructive in the palette, including Discord: Bulk Delete Messages, Discord: Ban Member, and Discord: Delete Channel, so the canvas warns before the click.

From AI assistants over MCP

Every node speaks MCP, the open protocol for connecting AI assistants to tools. Claude, ChatGPT, and Matter can read channels, post, manage roles, and moderate through the same nodes your workflows use, so agent actions leave the same execution trail as a scheduled run.

Reacting to Discord activity

There is no Discord trigger node, so a Discord message cannot start a workflow yet. Poll instead: use the Scheduled trigger with Discord: List Channel Messages, and keep track of the newest message id you have handled so the next run only picks up what is new. The webhook nodes here are outbound, they post into Discord rather than delivering events to Mattering.

Posting through a webhook instead of the bot

Discord: Send Webhook Message posts through a channel webhook URL and sends no bot token at all, because the webhook token in the URL is the credential. That lets a build system or a status page post under its own display name and avatar without a bot in the server. Discord: Create Webhook mints one, and the webhook token can be stored as a Secret Value and picked in the node rather than pasted into the graph.

Finding the ids nodes ask for

Nodes take Discord snowflake ids, not names. Walk down with Discord: List Bot Servers, then Discord: List Server Channels, then Discord: List Channel Messages. Discord: Search Server Members finds a member by the start of a username or nickname, Discord: List Server Roles returns role ids, and Discord: List Server Emojis gives you the name and id you combine as name:id when adding a custom-emoji reaction.

Handling rate limits explicitly

Discord limits are per route and per top-level resource, on top of a documented global ceiling of 50 requests per second per bot. The connector does not retry for you. On a 429 the node output carries rate_limited set to true and the retry_after seconds from Discord, so add a condition on rate_limited and an explicit Wait step rather than looping the call.

Keeping secret material out of run history

Discord: List Channel Webhooks, Discord: List Server Webhooks, Discord: Get Webhook, and Discord: Create Webhook all return the webhook token in their output. Anyone holding that token can post into the channel forever, with no Discord account. Do not pipe those outputs into task comments, artifacts, or run exports; pass the value straight into a Secret Value instead.

Troubleshooting

Every node returns 401 Unauthorized right after connecting
The token is being sent with the wrong prefix. Discord bot tokens must go out as Authorization: Bot <token>, and a bot token sent as Bearer returns 401 on every route, which looks exactly like a revoked token. Edit the connector and store the token in the Discord Bot Token credential type rather than a generic bearer credential. If the token itself was reset in the Developer Portal since you saved it, the old value is dead and you need to paste the new one. Then rerun Discord: Get Bot User.
The token works but every server or channel node returns 403 or an unknown-channel error
The bot is not in that server. A valid token proves the application exists; it does not put the bot anywhere. Run Discord: List Bot Servers to see which servers the bot is actually a member of. If yours is missing, build an invite link in the Developer Portal under OAuth2, URL Generator with the bot scope and the permissions you need, open it, and add the bot to the server.
One channel fails while the same node works fine in another
Channel permission overwrites are denying the bot something its server role grants. Discord resolves permissions per channel, so a bot with Manage Messages at the server level can still be blocked in a single channel. Open that channel's settings, check the bot's role under permissions, and grant what the node needs, such as View Channel and Read Message History for reads or Manage Messages for pins and deletes. Discord: Set Channel Permission Overwrite can also do this from a workflow, though the bot can only grant permissions it already holds itself.
Discord: List Server Members, Discord: List Thread Members, or Discord: Search Server Messages returns 403
These need privileged gateway intents, which are off by default. Open your application at discord.com/developers/applications, go to Bot, and enable Server Members Intent for the two member-listing nodes and Message Content Intent for message search. This is documented Discord behaviour, not a connector fault, and no permission on the invite substitutes for it. Applications in more than 100 servers need Discord to approve the intent before the toggle is available.
Discord: List Server Members or Discord: Search Server Members returns only one result
Discord defaults the limit parameter to 1 on both endpoints, so an unset limit looks like a broken connector. Set limit explicitly on the node, up to the maximum Discord documents for that endpoint, and page through with the after parameter when you need the whole list.
A node returns HTTP 429 with rate_limited set to true
Discord is rate limiting the bot. Limits are per route and per top-level resource, so posting to two different channels draws on two different buckets, and the bucket numbers are dynamic rather than fixed. There is also a documented global ceiling of 50 requests per second per bot. The connector deliberately does not retry: it returns rate_limited and the retry_after seconds on the node output so your flow can branch and wait with an explicit Wait step. Do not loop the failing call. Sustained invalid responses get the egress IP temporarily banned at Discord's edge, which takes down every other connector sharing it.
Adding a reaction returns an unknown emoji error
The emoji value is not in the form Discord expects. For a standard emoji, pass the character itself. For a custom server emoji, pass name:id, for example shipit:41771983429993937, which you can read from Discord: List Server Emojis. The connector percent-encodes the value for you, so do not encode it yourself before pasting it in.
Discord: Bulk Delete Messages rejects the whole batch
Discord refuses the entire call if any message id is older than two weeks or appears twice in the list, and the endpoint only works in server channels, not DMs. Deduplicate the ids and filter out anything older than two weeks, or delete those one at a time with Discord: Delete Message. Both are irreversible, so check the ids before you run it.
Adding a role fails with a permission error even though the bot has Manage Roles
Discord's role hierarchy applies. A bot can only assign or remove roles that sit below its own highest role in the server's role list. Open Server Settings, Roles, and drag the bot's role above the roles it needs to manage. The same hierarchy rule applies to kicks and bans against members who hold a higher role than the bot.
A write node succeeds but the output is empty
Many Discord write endpoints answer 204 No Content, which the node reports as a success with an empty data object. That is correct, not a failure, but it means a later step cannot read anything off it. Where you need the result, follow the write with a matching read, for example Discord: List Pinned Messages after Discord: Pin Message.
Discord: Search Server Messages returns no results and a retry_after
Discord answers 202 while it is still indexing that server's message history, with a retry_after value and no results. The connector reports that as a success because the call itself worked, so check for the presence of results before you use them, and retry after the interval Discord gives you.

Discord is a trademark of its respective owner. Mattering uses platform names to identify the services these integrations connect to; no endorsement or affiliation is implied.

Login Start Free