Email Service, Workers - Manage Email Routing rules with Wrangler
From the publisher
You can now manage Email Routing rules that route emails to Workers from your Wrangler configuration. Add literal addresses or a catch-all address to the top-level addresses field: { "$schema": "./node_modules/wrangler/config-schema.json", "name": "invoice-handler", "main": "src/index.ts", // Set this to today's date "compatibility_date": "2026-10-02", "addresses": [ "invoice@yourdomain.com" ] } name = "invoice-handler" main = "src/index.ts" # Set this to today's date compatibility_date = "2026-10-02" addresses = ["invoice@yourdomain.com"] When you run wrangler deploy, Wrangler creates rules for new addresses, updates existing rules managed by the Worker, and removes managed rules that are no longer in the configuration. Wrangler shows the planned changes and asks for confirmation before applying potentially destructive changes.
Source Cloudflare DevelopersCC BY 4.0 · Publisher excerpt shortened and converted to plain text. Original source license applies.
Read full article

