Post important emails to Slack, Microsoft Teams or Discord
Forward alert, order or VIP emails to a team chat channel: a webhook sends the email to a small function or automation that posts the message.
Why automate it
Some emails need the whole team's attention right away: a server alert, a large order, a message from a key client. A filtered webhook picks out just those emails and gets them into the channel where the team already works.
Set it up in three steps
- 1
Pick the emails that matter
Filter on the sender (for example *@monitoring.example) or the recipient (alerts@*). Everything else stays quietly in the mailbox.
- 2
Translate to the chat format
Chat apps expect their own JSON format, so point the webhook at a small function, or at n8n, Zapier or Make, which reformats the message.
- 3
Post to the channel
Send a short line with the sender and subject, and a link back to webmail, to the chat app's incoming webhook URL.
The webhook to create
In Settings › Developer, after you sign in.
| Format | JSON |
|---|---|
| From matches | empty (any sender) |
| To or Cc matches | alerts@* |
| Request headers | none needed |
| Extra JSON | none needed |
- Only the messages that match your filter reach the channel.
- The same pattern works for Teams, Discord, Mattermost or Google Chat.
- No mailbox password stored in a third-party bot.
Node.js: relay to a Slack incoming webhook
Every request includes the webhook's token in X-Polpo-Webhook-Token; check it first. See the payload reference.
export default async function handler(req, res) {
if (req.headers["x-polpo-webhook-token"] !== process.env.POLPO_TOKEN) return res.status(401).end();
const m = req.body.message;
await fetch(process.env.SLACK_WEBHOOK_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: `:email: *${m.subject}* from ${m.from.address}` }),
});
res.status(204).end();
}
Common questions
Can I point the webhook directly at a Slack or Teams incoming webhook URL?
Not directly: they expect their own message format, which differs from the webhook payload. A few lines of code, or a no-code tool such as n8n, Zapier or Make, translates it.
Will the channel get flooded?
Only messages that match the webhook's patterns are sent. Start with a narrow filter, such as one sender or one address, and use Send test to check the result before going live.
Is this included in the free plan?
Yes. Webhooks, the REST API and access tokens are included free, with up to 5 webhooks per mailbox and up to 10 mailboxes per domain.
More use cases
Support tickets from support@
Send every email to support@ to your helpdesk or your own ticket system as JSON the moment it arrives, with sender, subject, body and attachments.
See how →Sales enquiries into your CRM
Post every email to sales@ to your CRM or lead database as JSON, with your API key in a custom header, so no enquiry gets lost in an inbox.
See how →Supplier invoices to accounting
When an invoice arrives at invoices@, your webhook gets the details and a link to download each PDF with the REST API, ready for bookkeeping or OCR.
See how →Zapier, Make and n8n without polling
Use a webhook as an instant email trigger for no-code automations: point it at a Zapier Catch Hook, a Make custom webhook or an n8n Webhook node.
See how →AI triage and auto-sorting
Send each new email to your own AI classifier, then file, flag or draft a reply with the REST API: email triage you control, on your own domain.
See how →Start with one webhook.
Free business email on your own domain, with webhooks and a REST API included.
Create your free workspace