Building an AI Email Design Studio
How we used Cloudflare Workers AI to let developers generate beautiful emails from natural language prompts — no design skills required.
Designing email templates is hard. HTML email is a minefield of inline styles, table layouts, and client-specific hacks. We wanted to let developers skip all of that and just describe what they want.
The problem
Email design is a specialized skill. Most developers can build a web page, but email HTML is different — Outlook needs VML, Gmail strips tags, and responsive design is a battle. Hiring a designer for every transactional email isn't practical.
Our approach
We built the AI Design Studio on Cloudflare Workers AI — the same edge infrastructure that powers the rest of Relay. Here's how it works:
1. You describe the email — "A welcome email for a SaaS product with a gradient header and three feature cards" 2. AI generates the HTML — using a fine-tuned model that understands email-specific constraints 3. Visual editor for refinement — drag, drop, tweak colors, adjust spacing 4. Preview across clients — see how it looks in Outlook, Gmail, Apple Mail
The AI model is specifically trained on email HTML patterns — it knows about table layouts, inline styles, and client-specific workarounds. It won't generate code that breaks in Outlook.
The architecture
- Cloudflare Workers AI — runs the LLM at the edge, close to the user
- Durable Objects — maintain editor state for each session
- R2 — stores generated template assets
- D1 — indexes templates for search and retrieval
Everything runs at the edge. Template generation takes 2–3 seconds. No GPU servers, no cold starts.
Try it
The AI Design Studio is available on all plans — including the free tier. Sign up and start designing from the dashboard. No design skills required.