Discord Webhooks in 2026: Setup Guide With 7 Practical Examples
Discord webhooks are one of the platform's most underrated features. They let you send automated messages to any channel without a bot — just a URL and an HTTP request.
Whether you want GitHub commit notifications, form submission alerts, or custom monitoring dashboards, webhooks make it possible with zero coding experience (or minimal coding for advanced use cases).
This guide covers everything from creating your first webhook to seven practical integrations you can set up today.
What Are Discord Webhooks?
A webhook is a unique URL that accepts HTTP POST requests and converts them into Discord messages. Think of it as a one-way mailbox: anything you send to the URL appears as a message in the linked channel.
Webhooks vs. Bots: When to Use Which
| Feature | Webhooks | Bots |
|---|---|---|
| Send messages | Yes | Yes |
| Respond to commands | No | Yes |
| React to events | No | Yes |
| Require hosting | No | Yes |
| Custom username/avatar per message | Yes | Limited |
| Rate limits | 30/min per channel | Varies |
| Setup complexity | Very easy | Moderate to hard |
| Cost | Free | Free (but hosting costs) |
Use webhooks when you want to send notifications into Discord from external services.
Use bots when you need interactivity — responding to commands, managing roles, reacting to messages.
How to Create a Discord Webhook
Step 1: Open Channel Settings
Right-click the channel where you want the webhook to post, then click "Edit Channel."
Step 2: Go to Integrations
Click the "Integrations" tab in the left sidebar.
Step 3: Create Webhook
Click "Create Webhook." You can customize:
- Name: The display name for webhook messages (can be overridden per request)
- Avatar: The profile picture for webhook messages (can also be overridden)
- Channel: Which channel receives the messages
Step 4: Copy the Webhook URL
Click "Copy Webhook URL." This URL is your key — anyone with this URL can post messages to your channel. Keep it secret.
The URL looks like this:
https://discord.com/api/webhooks/1234567890/aBcDeFgHiJkLmNoPqRsTuVwXyZ
Sending Your First Webhook Message
You can test your webhook immediately using a simple HTTP request.
Using cURL (Terminal/Command Line)
curl -X POST "YOUR_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{"content": "Hello from a webhook!"}'
Using JavaScript (Node.js)
fetch("YOUR_WEBHOOK_URL", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ content: "Hello from a webhook!" })
});
Using Python
import requests
requests.post("YOUR_WEBHOOK_URL", json={
"content": "Hello from a webhook!"
})
If it works, you'll see a message appear in your channel from the webhook's username.
Rich Embeds: Making Webhook Messages Beautiful
Plain text messages work, but embeds make webhook notifications professional and scannable.
Embed Structure
{
"embeds": [{
"title": "New Order Received",
"description": "A customer just placed an order.",
"color": 5763719,
"fields": [
{ "name": "Customer", "value": "Jane Doe", "inline": true },
{ "name": "Amount", "value": "\$49.99", "inline": true },
{ "name": "Product", "value": "Premium Plan", "inline": false }
],
"footer": { "text": "Order #12345" },
"timestamp": "2026-04-16T12:00:00.000Z"
}]
}
Embed Limits
| Element | Limit |
|---|---|
| Title | 256 characters |
| Description | 4096 characters |
| Fields | 25 maximum |
| Field name | 256 characters |
| Field value | 1024 characters |
| Footer text | 2048 characters |
| Total embed size | 6000 characters |
| Embeds per message | 10 |
Color Values
Embed colors use decimal color values. Common ones:
| Color | Decimal Value | Hex |
|---|---|---|
| Red | 15548997 | #ED4245 |
| Green | 5763719 | #57F287 |
| Blue | 3447003 | #3498DB |
| Yellow | 16776960 | #FFFF00 |
| Purple | 10181046 | #9B59B6 |
| Orange | 15105570 | #E67E22 |
| White | 16777215 | #FFFFFF |
7 Practical Webhook Examples
Example 1: GitHub Commit Notifications
Get notified in Discord whenever someone pushes code to your repository.
Setup (No Code Required):
- Go to your GitHub repository > Settings > Webhooks
- Click "Add webhook"
- Payload URL: Your Discord webhook URL +
/github(e.g.,https://discord.com/api/webhooks/.../github) - Content type:
application/json - Select events: Pushes, Pull Requests, Issues (or "Send me everything")
- Click "Add webhook"
Discord automatically formats GitHub webhook payloads into readable embeds. No middleware needed.
What You'll See: Formatted messages showing commit messages, PR titles, issue updates, and who made them.
Example 2: Google Forms Submission Alerts
Get notified when someone fills out a Google Form — great for applications, feedback, and registrations.
Setup (Google Apps Script):
- Open your Google Form
- Click the three dots > Script Editor
- Paste this script:
function onFormSubmit(e) {
var responses = e.response.getItemResponses();
var fields = responses.map(function(r) {
return {
name: r.getItem().getTitle(),
value: r.getResponse() || "No answer",
inline: false
};
});
var payload = {
embeds: [{
title: "New Form Submission",
color: 5763719,
fields: fields,
timestamp: new Date().toISOString()
}]
};
UrlFetchApp.fetch("YOUR_WEBHOOK_URL", {
method: "post",
contentType: "application/json",
payload: JSON.stringify(payload)
});
}
- Set a trigger: Edit > Current project's triggers > Add trigger > onFormSubmit > From form > On form submit
Example 3: Notion Database Updates
Track changes to a Notion database (new tasks, status updates) in Discord.
Setup (Using Notion API + Simple Script):
Since Notion doesn't support outgoing webhooks natively, you'll need a small script or use a service like Make (formerly Integromat) or Zapier.
Using Make (No Code):
- Create a Make scenario
- Trigger: Notion > Watch Database Items
- Action: HTTP > Make a Request
- URL: Your Discord webhook URL
- Body:
{
"embeds": [{
"title": "Notion Update: {{title}}",
"description": "Status changed to **{{status}}**",
"color": 3447003,
"fields": [
{ "name": "Assigned To", "value": "{{assignee}}", "inline": true },
{ "name": "Priority", "value": "{{priority}}", "inline": true }
]
}]
}
Example 4: Server Monitoring / Uptime Alerts
Monitor your website or API and get Discord alerts when something goes down.
Setup (Using UptimeRobot — Free):
- Create an account on UptimeRobot
- Add a new monitor for your URL
- Go to My Settings > Alert Contacts > Add Alert Contact
- Type: Webhook
- URL: Your Discord webhook URL
- POST value:
{
"content": "🚨 **Alert**: *monitorFriendlyName* is *alertTypeFriendlyName*",
"embeds": [{
"title": "Uptime Alert",
"description": "*monitorFriendlyName* (*monitorURL*)",
"color": 15548997,
"fields": [
{ "name": "Status", "value": "*alertTypeFriendlyName*", "inline": true },
{ "name": "Duration", "value": "*alertDuration* seconds", "inline": true }
]
}]
}
Alternative: BetterStack (formerly Better Uptime) has native Discord webhook integration — just paste your webhook URL in their alert settings.
Example 5: IFTTT Automations
IFTTT (If This Then That) connects hundreds of services to Discord via webhooks.
Popular IFTTT + Discord Webhook Recipes:
| Trigger | Action |
|---|---|
| New tweet from @account | Post to Discord |
| New YouTube upload from channel | Post to Discord |
| Weather alert for your area | Post to Discord |
| New Reddit post in subreddit | Post to Discord |
| Smart home event (door opened, etc.) | Post to Discord |
Setup:
- Create an IFTTT account
- New Applet > Choose trigger service
- Action: Webhooks > Make a web request
- URL: Your Discord webhook URL
- Method: POST
- Content Type: application/json
- Body:
{
"content": "{{EventDescription}}",
"username": "IFTTT Bot"
}
Example 6: E-commerce Order Notifications
Get instant Discord alerts for new orders from Shopify, WooCommerce, or Stripe.
Shopify Setup (Native):
- Shopify Admin > Settings > Notifications
- Create a new webhook
- Event: Order creation
- URL: Your Discord webhook URL
- Format: JSON
Note: Shopify's payload format doesn't match Discord's expected format directly. You'll need a middleware service (Make, Zapier, or a simple serverless function) to transform the payload.
Stripe Setup (Using Stripe Webhooks):
- Stripe Dashboard > Developers > Webhooks
- Add endpoint: Your middleware URL (not Discord directly)
- Select events:
checkout.session.completed,payment_intent.succeeded - In your middleware, transform the Stripe event into a Discord embed and POST to your webhook
Example 7: Custom Logging Dashboard
Build a real-time logging system that posts application events to Discord channels.
Architecture:
Your App → Webhook URL → Discord Channel
├── #errors (red embeds)
├── #warnings (yellow embeds)
├── #info (blue embeds)
└── #deployments (green embeds)
Implementation (Node.js):
const WEBHOOKS = {
errors: "WEBHOOK_URL_FOR_ERRORS",
warnings: "WEBHOOK_URL_FOR_WARNINGS",
info: "WEBHOOK_URL_FOR_INFO",
deployments: "WEBHOOK_URL_FOR_DEPLOYMENTS"
};
const COLORS = {
errors: 15548997, // Red
warnings: 16776960, // Yellow
info: 3447003, // Blue
deployments: 5763719 // Green
};
async function log(level, title, details) {
await fetch(WEBHOOKS[level], {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
embeds: [{
title: title,
description: details,
color: COLORS[level],
timestamp: new Date().toISOString(),
footer: { text: `${level.toUpperCase()} | ${process.env.NODE_ENV}` }
}]
})
});
}
// Usage
log("errors", "Database Connection Failed", "PostgreSQL timeout after 30s");
log("deployments", "v2.4.1 Deployed", "3 files changed, 47 insertions");
Webhook Security Best Practices
Never Share Webhook URLs Publicly
Anyone with your webhook URL can post messages to your channel. Treat it like a password.
If a webhook URL is compromised:
- Go to the channel's Integration settings
- Delete the compromised webhook
- Create a new one
- Update all services using the old URL
Rate Limits
Discord enforces rate limits on webhooks:
| Limit | Value |
|---|---|
| Messages per minute (per webhook) | 30 |
| Messages per minute (per channel) | 30 |
| Embed size | 6000 characters |
| Total payload size | 8MB (including files) |
If you exceed rate limits, Discord returns a 429 status code with a retry_after value in milliseconds. Implement exponential backoff in your code.
Webhook Validation
For incoming webhooks from external services, validate that the request is legitimate:
- GitHub includes an
X-Hub-Signature-256header - Stripe includes a
Stripe-Signatureheader - Custom services should use a shared secret
IP Allowlisting
If your webhook source has a static IP, consider using a middleware that only accepts requests from known IPs before forwarding to Discord.
Advanced Webhook Features
Custom Username and Avatar Per Message
Override the webhook's default name and avatar on a per-message basis:
{
"content": "Server is healthy!",
"username": "Health Monitor",
"avatar_url": "https://example.com/health-icon.png"
}
This lets a single webhook appear as different "bots" depending on the message type.
Thread Support
Post to a specific thread using the thread_id query parameter:
https://discord.com/api/webhooks/ID/TOKEN?thread_id=THREAD_ID
File Uploads
Webhooks can upload files using multipart form data:
curl -X POST "YOUR_WEBHOOK_URL" \
-F 'payload_json={"content": "Here is the log file"}' \
-F "file=@/path/to/logfile.txt"
Wait Parameter
Add ?wait=true to get the created message object in the response:
https://discord.com/api/webhooks/ID/TOKEN?wait=true
This returns the message ID, which you can use to edit or delete the message later.
Editing and Deleting Webhook Messages
Edit a previously sent message:
curl -X PATCH "YOUR_WEBHOOK_URL/messages/MESSAGE_ID" \
-H "Content-Type: application/json" \
-d '{"content": "Updated message content"}'
Delete a message:
curl -X DELETE "YOUR_WEBHOOK_URL/messages/MESSAGE_ID"
Webhooks for Non-Technical Users
If the code examples above feel overwhelming, you don't need to write a single line of code to use webhooks effectively.
No-Code Webhook Tools
| Tool | What It Does | Pricing |
|---|---|---|
| Make (Integromat) | Visual workflow builder, connects 1000+ apps | Free tier available |
| Zapier | Similar to Make, simpler UI | Free tier available |
| IFTTT | Simple if/then automations | Free tier available |
| n8n | Self-hosted workflow automation | Free (self-hosted) |
When You Just Want Automation Without Webhooks
Webhooks are powerful but still require some technical setup. If you want Discord automation without dealing with URLs, JSON, and HTTP requests, bots like PeakBot handle common automation tasks through a visual dashboard — no webhook configuration needed.
For example, PeakBot can set up welcome messages, auto-roles, logging, and moderation triggers through its AI interface. You describe what you want, and it configures the automation for you.
Frequently Asked Questions
Are Discord webhooks free?
Yes, completely free. There's no limit on how many webhooks you can create, and Discord doesn't charge for webhook usage. The only constraint is rate limits (30 messages per minute per webhook).
Can webhooks read messages from Discord?
No. Webhooks are one-way — they can only send messages TO Discord. They cannot read messages, react to events, or respond to commands. For those capabilities, you need a bot.
How do I format webhook messages with bold, italic, etc.?
Webhook messages support Discord's markdown formatting:
- Bold:
**text** - Italic:
*text* Strikethrough:~~text~~Code: `text`- Code block: ```language\ncode```
Can I use webhooks in DMs?
No. Webhooks are channel-specific and can only post to the channel they're created in. You cannot create webhooks for direct messages.
What happens if I delete the channel a webhook is linked to?
The webhook is deleted along with the channel. Any services still sending to that webhook URL will receive error responses.
Can multiple services use the same webhook?
Yes, but all messages will go to the same channel. If you want different formatting or organization, create separate webhooks for separate services — they can even post to the same channel with different usernames and avatars.
Want Discord automations without the technical setup? PeakBot lets you configure welcome messages, moderation, logging, and more through an AI-powered dashboard — no webhooks or code required.
