Claude Templates / A-tier · High leverage

Admin & Ops

The Email Automation Console Playbook

The operator half of email — campaigns, templates, enrollments, analytics.

EMAIL-AUTOMATION-CONSOLE-PLAYBOOK.md · 18 sections · 5,795 words · 47 KB · markdown

Email Infrastructure is the engine; this is the cockpit. Six management pages, fourteen admin API routes, a condition DSL for skip and exit rules, and the lifecycle workers that keep enrollments moving — so you can edit a campaign without editing code.

What's inside

When to use it

After the email engine and admin shell exist.

Straight from the file

Primary button is the global .btn.btn-solid class (orange fill, pill radius, color:#0b0b0f) — established in globals.css by ADMIN-CONSOLE. Pages shrink it via inline overrides but keep the class.

Table of contents

  1. 0. Use this spec
  2. 1. What this builds (full surface map)
  3. 2. Design system — the replication core (copy verbatim)
  4. 3. Admin auth guard (every /api/admin/email/ route)
  5. 4. Page — Campaigns list (email/page.tsx)
  6. 5. Page — Campaign editor (email/[id]/page.tsx)
  7. 6. Page — Templates (email/templates/page.tsx)
  8. 7. Page — Layout (email/layout/page.tsx)
  9. 8. Page — Enrollments (email/enrollments/page.tsx)
  10. 9. Page — Analytics (email/analytics/page.tsx)
  11. 10. The 14 admin API routes (reference)
  12. 11. The engine layer
  13. 12. Schema additions beyond EMAIL-INFRASTRUCTURE
  14. 13. Seed campaigns
  15. 14. Invariants to preserve (do not regress)
  16. 15. Build sequence (slices — pause after each for review)
  17. 16. Kickoff prompt
  18. 17. Reference files in BKE

How to run it

Drop EMAIL-AUTOMATION-CONSOLE-PLAYBOOK.md into your repo, then tell Claude Code: “Read EMAIL-AUTOMATION-CONSOLE-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.

↓ Download the playbook

More admin & ops playbooks

← All 28 Claude templates