Email Routing Gets Programmable

Cloudflare’s Email Routing service has attracted a few hundred thousand users, and the request queue is long. The team's answer to that backlog is not a longer feature list, but a more flexible foundation: Route to Workers, a programmatic way to handle inbound email.

The feature enters closed beta soon, and interested users can join a waitlist today. With Route to Workers, any rule attached to a custom email address can hand the incoming message off to a Cloudflare Worker for processing, rather than only forwarding to a fixed destination.

From the Inbox to the Event Handler

The Workers used for email processing are standard Workers—they just listen for a new event type. Ordinary Workers listen to incoming requests with the standard fetch-style handler.

Email Workers instead handle a email event. That event exposes the message's from, to, full headers, and raw body, which can be used to drive any decision workflow. This includes calling external APIs, orchestrating multi-step logic, and, finally, choosing an action: reject the message or forward it to one of the verified destination addresses configured in Email Routing.

A minimal example filters on the sender address and forwards matching messages to a verified destination, optionally triggering a Slack notification along the way. The same mechanisms can support blocklists, allowlists, content-based filtering, tagging, and other common patterns.

Starters and Straight-to-Editor Options

Onboarding is built into the Email Routing dashboard. A single click creates a Worker, and the Create flow offers starter templates that pre-populate the editor for popular use cases—blocking or allowing senders, filtering by content, tagging messages, or pinging Slack for urgent items. Users who prefer to write their own code from scratch can skip the starters and open the editor directly.

Workers execute JavaScript and WebAssembly, with continued support for additional languages, so most developers will be writing in familiar territory. An email-processing Worker can use the full range of standard Worker features in addition to the new email event.

Pricing and Availability

The first 100,000 Worker requests, or email triggers, per day are free. Paid plans start at $5 per 10 million requests. Usage of email Workers is visible directly in the Email Routing dashboard.

To join the waitlist, navigate to the Email section of the Cloudflare dashboard, open the Email Workers tab, and click the Waitlist button. The closed beta is expected to begin within weeks.