A copy-pasteable recipe for demo@yourdomain.com — an email address that joins scheduling threads, proposes meeting times, follows the back-and-forth, and emails an .ics calendar invite once everyone confirms. The whole thing runs on a single Cloudflare Worker plus a Claude Code session driving the conversation in real time.
This gist is meant to be dropped into a new Claude Code session as build context. By the end you will have:
demo@yourdomain.comaccepting inbound mail through Cloudflare Email Routing- A Worker that parses MIME, persists each thread message to D1, and exposes a small HTTP API
- A local poller that streams new messages into the session via the
Monitortool - A live agent loop that reads the thread, replies in-thread with proper threading headers, and attaches an RFC 5545
.icson the final confirmation