Why Connect Discord to Inbound Email
Teams using Discord for real-time communication often miss critical signals that arrive by email. Customer support requests, system alerts, and business notifications all land in inboxes — but Discord is where your team actually works. JsonHook connects the two, delivering parsed email content directly into Discord so nothing falls through the cracks.
Connecting your inbound email to Discord through JsonHook unlocks a range of high-value automation scenarios:
- Post a formatted message to a dedicated channel whenever a support email arrives
- Alert on-call engineers when an error notification email is received
- Notify a sales channel the moment a new lead inquiry email comes in
- Share customer feedback emails with the product team in real time
- Create a digest of daily report emails delivered each morning to a channel
Discord supports Channel Webhook URL, which makes it a natural target for JsonHook's outbound POST requests. Every email that hits your JsonHook address is parsed within milliseconds and delivered to Discord as a clean JSON object — no polling, no manual export, no middleware server to maintain.
Setting Up Discord with JsonHook
The following steps walk you through connecting JsonHook to Discord. The entire setup typically takes under ten minutes.
- Step 1: In your Discord server, open the channel you want to receive email notifications in. Go to Edit Channel → Integrations → Webhooks and click New Webhook. Give it a name and copy the Webhook URL.
- Step 2: In JsonHook, create an inbound email address and paste the Discord Webhook URL as the destination endpoint.
- Step 3: Configure the request body template in JsonHook to match Discord's expected format:
{"content": "**New email from {{from.address}}**\n**Subject:** {{subject}}\n{{text}}"}. - Step 4: Send a test email to your JsonHook address and confirm the formatted message appears in your Discord channel within seconds.
Once the connection is active, every email sent to your JsonHook address will be automatically parsed and forwarded to Discord. You can test the integration by sending a plain-text email to your JsonHook address and verifying that the payload appears in Discord within a few seconds.
JsonHook supports Channel Webhook URL on the Discord side, so no additional configuration is needed in Discord beyond the steps above. If Discord requires header-based authentication for incoming webhooks, add the required headers in the JsonHook endpoint configuration under Advanced Settings.
Example Workflow: When a new GitHub issue notification email arrives, post a formatted alert to the #dev-alerts Discord channel
This walkthrough demonstrates one concrete way to use JsonHook with Discord. The scenario: When a new GitHub issue notification email arrives, post a formatted alert to the #dev-alerts Discord channel.
When an email matching this scenario arrives, JsonHook parses the raw SMTP message and constructs the following JSON payload before POSTing it to your Discord endpoint:
{
"messageId": "",
"from": {
"name": "Jane Smith",
"address": "[email protected]"
},
"to": [
{ "address": "[email protected]" }
],
"subject": "When a new GitHub issue notification email arrives, post a formatted alert to the #dev-alerts Discord channel",
"text": "Hi, I need help with my account. Please contact me at your earliest convenience.",
"html": "Hi, I need help with my account...
",
"date": "2026-03-15T10:32:00.000Z",
"attachments": [],
"headers": {
"x-priority": "1"
}
}
Discord webhooks accept a JSON payload with a content field for plain messages and an embeds array for rich embed cards. Map subject to the embed title, text to the embed description, from.address to the embed footer, and date to the embed timestamp for a polished notification card.
Once Discord receives this payload, it can execute any downstream action — whether that is posting a notification, creating a record, updating a field, or triggering an entire multi-step workflow. The key advantage is that the data arrives as structured JSON, so Discord never needs to parse raw email text or deal with MIME encoding.
Payload Mapping for Discord
JsonHook delivers a consistent JSON schema for every parsed email. The table below shows which JsonHook fields map to the equivalent fields in Discord. Use this as a reference when configuring your Discord Channel Webhook URL.
| JsonHook Field | Description | Discord Field |
|---|---|---|
from.address | Sender email address | Sender / Contact email |
from.name | Sender display name | Sender / Contact name |
subject | Email subject line | Title / Subject / Name |
text | Plain-text email body | Description / Body / Message |
html | HTML email body | Rich text field / Notes |
date | Timestamp of receipt (ISO 8601) | Created date / Received at |
attachments[n].filename | Attachment filename | File name / Attachment label |
attachments[n].content | Attachment content (base64) | File content / Binary field |
headers.* | Raw email headers | Metadata / Custom properties |
messageId | Unique message identifier | External ID / Deduplication key |
Not every field will be present in every email. Always check for null or missing values before mapping to required fields in Discord. For text-only emails, html will be empty; for HTML-only emails, text may be empty or auto-generated from the HTML. The attachments array will be an empty array when no files are attached.
Best Practices for Discord Email Integration
Following these best practices will make your Discord email integration more reliable, easier to debug, and simpler to scale as your email volume grows.
- Use dedicated addresses per workflow. Create a separate JsonHook inbound address for each distinct Discord workflow you want to trigger. This makes routing explicit and avoids a single endpoint becoming a bottleneck for all email types.
- Validate the payload before acting. In Discord, add a conditional check at the start of your workflow to confirm that required fields like
from.addressandsubjectare present and non-empty before executing downstream actions. - Test with real emails first. Use JsonHook's delivery log to inspect the raw JSON payload before wiring up Discord. Confirm that all the fields you plan to map are actually populated by your email source.
- Handle errors gracefully. Configure Discord to catch webhook delivery failures and send an alert. JsonHook will retry failed deliveries, but your Discord endpoint should return a 2xx status promptly to acknowledge receipt.
- Keep secrets out of email content. Avoid routing emails that contain passwords, API keys, or PII through workflows unless you have appropriate data-handling controls configured in Discord. Use JsonHook's HTTPS delivery to protect data in transit.