Discord Webhooks
Included with Macro DeckPost rich messages with embeds and mentions to Discord channels through webhooks, with a live preview.
The Add a Discord webhook dialog with the Name and Webhook URL fields
- Save webhooks by name, one per channel
- Visual editor with a preview that looks like Discord
- Up to 10 embeds with fields, images, author and footer
- Mentions notify nobody unless you allow it
- Template variables are filled in when the action runs
A Discord webhook lets anything that knows its URL post into one Discord channel. The Discord Webhooks integration saves webhooks under a name and gives you one action, Send Discord webhook message, with a visual editor for the message. It does not need the Discord app or a Discord account on the computer that runs Macro Deck.
What you can send
The editor has four tabs:
- Message: the message text with Discord Markdown and line breaks, plus buttons that insert a user or role mention,
@everyoneor@here. - Embeds: up to 10 embeds, each with a title and title link, description, color, timestamp, author, footer, image, thumbnail and up to 25 fields that can be shown side by side.
- Profile: a username and avatar for this message instead of the webhook's own.
- Mentions: who may be notified by the mentions in the message.
By default a message notifies nobody, even when it mentions someone, @everyone or @here. The mention is still shown in Discord, it just does not ping. All text fields accept template variables, which are filled in when the action runs, so a message can carry the current scene, song or viewer count.
The preview below the editor changes as you type and shows the message the way Discord draws it. It never sends anything to Discord. Images are shown as placeholders, and variables appear as you wrote them. Send test message sends the message to Discord right away after you confirm with Send now, so you can check how it really looks.
Some example setups:
- A Going live button that posts an embed with your stream title and link to your announcements channel.
- A button that posts the song that is playing to a music channel.
- An automation that sends a message to a moderators channel when something happens on your stream.
Saved webhooks and custom URLs
Add one configuration per channel, then pick the webhook by its name in every action. When the URL changes, you change it in one place. For a one-off message you can also set Webhook to Custom URL and paste the URL into the action. Macro Deck stores every webhook URL encrypted, never shows it again and never writes it to the log.
Macro Deck checks Discord's limits before it sends, for example 2000 characters of message text and 6000 characters in all embeds together, and lists any problem above the preview while you edit. When Discord limits how often a webhook may post, Macro Deck waits and tries once more if the wait is 5 seconds or less.
What you need
- Macro Deck 3 on Windows, macOS or Linux
- An internet connection on the computer that runs Macro Deck
- A Discord channel where you may manage webhooks, and its webhook URL
Set it up
Step 1: Create a webhook in Discord
In Discord, open the settings of the channel, go to Integrations, then Webhooks, and create a webhook or pick one. Click Copy Webhook URL. The URL starts with
https://discord.com/api/webhooks/. Anyone who has it can post into the channel, so treat it like a password.Step 2: Open Discord Webhooks in Macro Deck
In Macro Deck, click Integrations in the sidebar and click Discord Webhooks. On the Overview tab, click Add configuration in the Configuration section. Turning on the switch at the top right opens the same dialog.
Step 3: Save the webhook
Fill in the dialog Add a Discord webhook:
- Name: shown when you pick the webhook in an action, for example the channel name.
- Webhook URL: the URL you copied in Discord.
Click Continue. Add one configuration for each further channel.
Step 4: Add the action to a button
On the Deck page, click the button you want to use. The deck must be unlocked: when the button at the top right reads Lock, it is unlocked. The editor opens with Short Press selected. Click + Add action, select Discord Webhooks on the left of the Add action dialog and pick Send Discord webhook message.
Step 5: Write the message
Choose the saved webhook under Webhook. Write the Message text on the Message tab, and add embeds on the Embeds tab if you like. Check the preview, then click Send test message and Send now to see the message in Discord.
Step 6: Press the button
Press the button on your phone, tablet or in the web client. The message appears in the Discord channel, with any variables filled in. If it does not, the action shows the reason, for example that Discord rejected the webhook token.
Actions1
Put these on a button or run them from a flow.
- Send Discord webhook message
- Sends a message with optional embeds through a saved or custom Discord webhook, edited with a live preview.
Frequently asked questions
How do I mention a user or a role?
A mention needs the Discord ID. In Discord, turn on Developer Mode in the advanced settings, then right-click the user or role and choose Copy ID. On the Mentions tab, choose whether nobody, everyone mentioned or only the IDs you list is notified.
What is the difference to the Discord integration?
The Discord integration has an older Execute Webhook action with one embed and no preview. It keeps working. Discord Webhooks adds several embeds, mentions control, a profile per message and the live preview.
Where is the webhook URL stored?
Macro Deck stores it encrypted on the computer that runs Macro Deck. It is never shown again, never written to the log and never part of the preview. To change it, enter it again. Only Discord webhook addresses on discord.com, discordapp.com, ptb.discord.com and canary.discord.com are accepted.
Why is a variable not filled in my test message?
Send test message sends variables as written. They are only filled in when the action runs from a button, automation or script.
Why does the action fail?
The action shows the reason, for example that the message is empty or too long, that the webhook no longer exists in Discord, that Discord rejected the webhook token, or that Discord is rate limiting the webhook. If the token was rejected, copy the webhook URL again and enter it in the configuration.
Can I edit the message in the Companion app?
The Companion app and older desktop apps show the action's plain settings, with the message as keys and values such as content and embeds.0.title, and do not save changes made in the visual editor. Edit rich messages in the current desktop app.