email-worker
email-worker copied to clipboard
Lightweight tool to process emails directly from Cloudflare
Email worker ·

Send emails to Cloudflare and forward them to different channels using an email worker.
Setup
Prerequisites
Install dependencies
yarn install
Deploy the worker
yarn deploy
Set up a webhook
- Right-click on a Discord channel then click
Edit Channel
, thenIntegrations
. - Create a webhook, then copy the URL.
- Add this url to your secrets:
wrangler secret put DISCORD_WEBHOOK_URL
You should see something like this
🌀 Creating the secret for the Worker "email-worker"
✨ Success! Uploaded secret DISCORD_WEBHOOK_URL
Set up a route
- Go to your zone's Email Workers settings.
- Click the zone (e.g.
example.com
), thenEmail
,Email Routing
. - On the
Email Workers
tab, register an email route.
Verify
- Send an email to the email address you registered.
- Check the channel you registered the webhook to.
Tips
- Change the
name
field inwrangler.toml
to deploy a separate worker with a separate secret (e.g. with a separate webhook for a test channel).
License
This package is MIT licensed.