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

By Moe Ameen, founder of BILT · Published · Updated

The Email Automation Console Playbook builds the admin screens for running email campaigns without editing code. Claude Code adds six pages (campaigns, campaign editor, templates, layout, enrollments, analytics), 14 admin API routes, a condition language for skip and exit rules such as converted_to_paid, lifecycle workers that enroll users on behavior, and seed campaigns. The file estimates about 2,900 lines across the six pages.

Key takeaways

  • Six pages and 14 admin API routes, specified in the file.
  • Skip and exit rules use a small condition language.
  • Workers enroll users when behavior events fire.
  • Ships with seed campaigns, including a lead-magnet nurture.

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 does the Email Automation Console Playbook build?

It builds the operator side of email: list and edit campaigns, manage templates with a live preview, edit the brand layout, look up and bulk-enroll users, and read 7-90 day analytics.

It also lists invariants not to break and a sliced build order that pauses for review after each slice.

When should you add the email console?

Add it after the email engine and admin shell exist, when changing a drip by editing code gets slow.

If you run one welcome email, the infrastructure playbook alone is enough.

What do you need first?

You need Email Infrastructure already shipped, including its four tables, layout row, opt-out flag and drip worker, plus the Admin Console shell and a Trigger.dev project.

Profiles need role, plan, account_status, email_opt_out and full_name columns.

What's inside

What does the playbook give you?

When to use it

After the email engine and admin shell exist.

Straight from the file

What does the writing look like?

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

Which sections does the file cover?

  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 do you 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

Who is this for, and who should skip it?

Best for

  • Founders who run lifecycle email themselves
  • Apps with several drips and behavioral triggers
  • Teams that want email data in their own database

Not ideal for

  • Apps with one or two static emails
  • Teams on a hosted marketing automation tool they like
  • Apps without the Email Infrastructure playbook
  • Builders who won't adapt paths: the file points to a reference app you won't have

What else do people ask?

What does the Email Automation Console Playbook ask for up front?

The Email Automation Console Playbook's kickoff prompt asks for your app name and founder display name, your sending domain and from addresses, whether to build the lead-magnet funnel and the day-2 gift worker, your activation signal for the has_published condition, and which trigger events to seed campaigns for at launch.

Can I skip the lead-magnet funnel or the day-2 gift worker?

Yes, the Email Automation Console Playbook marks both optional. The magnet_leads tables and lead-nurture worker only matter if you run the cold-traffic funnel, and the trial-day2-gift worker only fits apps with a per-output gift to give.

Does it work outside Next.js, Supabase, Postmark and Trigger.dev?

The Email Automation Console Playbook is written for that stack: Next.js pages and API routes, Supabase with RLS, Postmark via the Email Infrastructure Playbook, and Trigger.dev for the lifecycle workers. It doesn't describe alternatives, so a different stack means rewriting those layers yourself.

What is in the Email Automation Console Playbook download?

The Email Automation Console Playbook is a markdown file of about 5,800 words. It has TypeScript for the shared styles, admin auth guard and condition DSL, SQL for the trigger_event CHECK, the enrollment triggers and the lead-magnet tables, a table of all 14 admin routes, 10 invariants and an 8-slice build sequence.

Which campaigns can be marked transactional?

The Email Automation Console Playbook only allows is_transactional=true on payment_failed (or your own dunning events), checked on both create and patch. Transactional campaigns skip opt-out, the unsubscribe footer and List-Unsubscribe, which is why the file keeps them to legally exempt notices.

How do we know this?

This page is based on the playbook file itself, EMAIL-AUTOMATION-CONSOLE-PLAYBOOK.md, which Moe Ameen wrote from the Kompozy codebase (called BKE in the file). We read the file on November 4, 2026; the facts here come from it, not from independent testing in other codebases.

More admin & ops playbooks

← All 28 Claude templates