Free: write once, publish to 7 networks, on time. Start free

← All posts

Developers

Announce releases in Discord and Slack with webhooks

2 December 2026 · By the Yeetzo team · 5 min read

$ curl -X POST $WEBHOOK_URL -d content200 ok

You do not need to build a bot to put a message in a channel. Discord and Slack both offer webhooks: a private web address that turns a request into a message. For release notes, deploy notices and weekly summaries, that is usually enough.

How a webhook works

You create the webhook inside the app and receive an address. Sending a small JSON document to it with an HTTP POST publishes a message in the channel the webhook belongs to. There is no sign-in step, because the address itself is the credential.

That convenience is also the risk. Anyone who has the address can post. Treat it like a password.

Discord

Create it

Open the channel's settings with Edit channel, go to Integrations, then Webhooks, create one, name it and copy the URL. You need permission to manage webhooks on that server.

Send a message

curl -X POST "$DISCORD_WEBHOOK_URL" -H "Content-Type: application/json" -d '{"content": "**v2.0** is out. Notes: https://example.com/notes"}'

The content field holds up to 2000 characters and understands Discord's Markdown. Add ?wait=true to the address if you want the created message returned, which is handy for confirming delivery or editing it later.

Stop accidental pings

If your text is assembled from commit messages or user input, it might contain @everyone. Tell Discord not to turn text into mentions:

{
  "content": "Release notes: @everyone was mentioned in a commit title",
  "allowed_mentions": { "parse": [] }
}

Make this the default in any script. A midnight notification to a whole community is hard to take back.

Richer messages

embeds adds titled blocks with a link, a description and a coloured edge, up to ten in one message. Use one embed per release and keep fields few. Plain text often reads better on a phone.

Slack

Create it

Go to api.slack.com/apps, create an app for your workspace, switch on Incoming Webhooks, and add a webhook to the channel you want. Some workspaces require an admin to approve the app.

Send a message

curl -X POST "$SLACK_WEBHOOK_URL" -H "Content-Type: application/json" -d '{"text": "*v2.0* is out. <https://example.com/notes|Read the notes>"}'

A successful request returns the word ok.

Formatting differs from Discord

You wantDiscordSlack
Bold**text***text*
Italic*text*_text_
Labelled link[label](url)<url|label>
CodeBackticksBackticks

Copying one format into the other is the most common cosmetic bug. In Slack, also escape &, < and > when they are meant literally.

Slack truncates messages longer than 40,000 characters, but a message anywhere near that is unreadable. Send a short summary and a link.

A small release script

This Node script sends the same news to both, each in its own format:

const [version, url] = process.argv.slice(2);

async function send(hook, body) {
  const res = await fetch(hook, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(body)
  });
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
}

await send(process.env.DISCORD_WEBHOOK_URL, {
  content: `**${version}** is out: ${url}`,
  allowed_mentions: { parse: [] }
});
await send(process.env.SLACK_WEBHOOK_URL, {
  text: `*${version}* is out: <${url}|release notes>`
});

Save it as announce.mjs and run node announce.mjs v2.0 https://example.com/notes.

Rate limits and retries

Both services limit how fast you can post and answer with status 429 when you go too fast. Read the wait time from the response (Discord sends retry_after; Slack sends a Retry-After header) and pause for that long. Retry a few times, then stop and log the failure. A loop that retries immediately only makes things worse.

Looking after the secret

Writing the message

Lead with what changed for the reader, not the version number alone. Name anything they must do, such as updating a setting. Link to the full notes once. If nothing in the release affects the people in that channel, do not post.

When you want a schedule

A script fires the moment you run it. If you want to write on Friday and publish on Monday, see the result on a calendar, or send the same news to social networks too, paste the webhook URL into Yeetzo and schedule from there. Yeetzo can also post from your release feed automatically, as drafts first if you want to check the wording.

Questions people ask

Can I change a message after it is sent?

With Discord, yes: add ?wait=true when you send, keep the message id that comes back, and later send a PATCH request to the webhook address followed by /messages/ and that id. A Slack incoming webhook cannot edit what it posted. Editing in Slack needs a full app with a bot token, which is more setup than most announcement scripts deserve. If you cannot edit, send a short follow-up instead.

Can a webhook post into a thread?

Discord webhooks can, by adding a thread_id parameter to the address. Slack incoming webhooks cannot reply into a thread, so related messages arrive as separate posts. If you plan a multi-part announcement for Slack, make each part make sense alone.

Can I choose the name and picture?

On Discord, set username and avatar_url in the body to override the webhook's defaults for one message. On Slack, the sender name and icon come from the app settings, so name the app something your colleagues will recognise, such as Release notes.

Can I attach a file?

Discord webhooks accept files in a multipart request. Slack incoming webhooks do not take attachments, so link to the file instead.

How do I test without annoying everyone?

Create a private channel named something like bot-test, make a webhook there, and point your script at it until the message looks right. Change the address in your environment variable when you are ready to go live. Never test in a channel with thousands of members.

What should I log?

Record the status code and the response body for every call, and the time. A silent failure is the worst kind: the release goes out and nobody is told. If a call fails after the retries, make your script exit with an error so your CI system turns red and someone notices.

Is a webhook the right tool for conversations?

No. Webhooks only send. If you want people to be able to run commands, receive replies or click buttons, you need a bot. If you simply want a reliable one-way announcement, a webhook is simpler and has fewer things to break.

Write it once. Post it everywhere.

Free account, no card.