// guides

Forward emails to a Discord channel (Gmail, Outlook, any IMAP)

Post new emails from one or more inboxes into Discord channels, with per-inbox filters, no bot to host and no mail forwarding rules. Free Python script and n8n workflow.

Updated 2026-10-16 · about 10 minutes

Rather not set it up yourself? Describe your task in one sentence and we'll build and test it for you, free →

Steps

  1. Create a Discord webhook

    In the channel: Edit Channel → Integrations → Webhooks → New Webhook → Copy URL. New to webhooks? See Discord webhooks for beginners.

  2. Download the agent

    Get the email to Discord agent. Try python3 email_to_discord.py --eml-dir sample_emails --dry-run.

  3. Connect one inbox

    Set IMAP_HOST, IMAP_USER, IMAP_PASSWORD (app password) and DISCORD_WEBHOOK_URL. The first run only remembers existing mail, so nothing old gets posted.

  4. Add filters or more inboxes

    Use SUBJECT_CONTAINS=order,booking, FROM_CONTAINS or EXCLUDE=newsletter. For several inboxes, copy inboxes.example.json and give each inbox its own filters and webhook.

  5. Run it every 5 minutes

    Cron */5 * * * *, or import the n8n workflow, which uses an IMAP trigger and posts instantly.

Good uses

Safety

Emails are never marked read, moved or deleted. Pings are disabled, so an email containing @everyone can't ping your server. Don't connect an inbox that receives login codes or bank emails to a channel others can read.

Skip the setup: free download

The Email to Discord agent does all of this. It's tested, MIT-licensed, and comes as an n8n workflow plus a Python script.

Get the free Email to Discord agent → Or have us build yours →

FAQ

Do I need a Discord bot?

No. A webhook URL is enough, and nothing needs to stay online except the script or n8n.

Does it post attachments?

It lists attachment names. Pair it with the attachment saver if you need the files.

Why not Gmail forwarding to Discord?

Discord has no email address to forward to. Something has to read the mail and call the webhook, and that's what this does.

Related guides

New guides

Want one built for your task?

Describe it in one sentence. We build it, test it and email it to you, usually within 24h. Free while we're in beta.

We'll only email you about your agent and TaskToAgent.