I've been building email automation workflows with Claude Code for the past eight months, and the results have been better than anything I got from traditional platforms like ActiveCampaign or HubSpot. Not because the platforms are bad — they're not — but because most businesses don't need 90% of what they're paying for, and they do need a few very specific things those platforms don't offer out of the box.
Here's the honest truth: email automation with Claude Code is not a plug-and-play solution. You're not going to drag-and-drop your way to a working system in fifteen minutes. But if you're willing to invest a few days upfront to build exactly what you need, you'll own a system that does exactly what you want — no monthly fees, no feature bloat, no limits on contact counts or send volume.
I'm going to walk through the three workflows I use most often, the technical setup that powers them, and the results I've seen with real clients in Vancouver.
Why I Stopped Using Traditional Email Platforms
The breaking point for me was a client who ran a coaching business. She had 4,200 contacts in her CRM and was paying $320/month for ActiveCampaign. She used three features: sending a weekly newsletter, tagging people based on link clicks, and triggering a four-email onboarding sequence when someone signed up for her lead magnet.
That's it. Three workflows. $320 a month.
I rebuilt the entire system with Claude Code in two days. The scripts run on a simple cron job, store contact data in a SQLite database, send emails through AWS SES (which costs about $4/month for her volume), and track opens and clicks with simple query parameters. Total monthly cost: under $10. Same functionality. Full control over the data. No artificial limits.
The real win wasn't the cost savings — it was that we could finally build the workflows she actually needed instead of hacking together workarounds inside a platform that wasn't designed for her use case.
The Three Email Workflows I Build Most Often
1. Lead Magnet Sequences with Dynamic Personalization
This is the most common request. Someone downloads a PDF, joins a waitlist, or registers for a webinar, and you want to send them a sequence of 3–7 emails over the next week or two. Standard stuff.
Where Claude Code shines: personalization beyond just first name. I can pull in any data point from the contact record or the action that triggered the sequence. For a real estate agent client, the lead magnet was a neighborhood guide. When someone downloaded it, the sequence referenced the specific neighborhood they chose, pulled in recent listings from that area, and adjusted the tone based on whether they were a buyer or seller (captured in the download form).
The workflow logic:
1. Contact submits form → data stored in SQLite 2. Trigger script runs every 15 minutes, checks for new entries 3. For each new contact, schedule Day 1, Day 3, Day 5, Day 7 emails 4. Each email template pulls variables from contact record 5. Link clicks update contact tags in database 6. If contact clicks "schedule consultation" link, pause sequence
That last part — pausing the sequence when someone takes the desired action — is trivial in code but surprisingly hard to set up cleanly in most email platforms without paying for a higher tier.
2. Behavioral Segmentation Based on Engagement
This one is about sorting your list into groups based on what they do (or don't do) and sending different content to each group. Opens but doesn't click? One path. Clicks but doesn't convert? Different path. Goes silent for 30 days? Re-engagement sequence.
I built this for a SaaS client who had a free trial. The challenge: people who signed up for the trial but never logged in needed different emails than people who logged in once and then disappeared, who needed different emails than people who were actively using the product but hadn't upgraded yet.
With Claude Code, I set up a daily script that queries the product database, cross-references it with the contact database, and assigns each contact to one of five segments. Each segment gets its own email cadence. The logic lives in about 200 lines of Python and took me a day and a half to build.
The result: trial-to-paid conversion went from 8% to 14% in six weeks. The CEO attributed it to "finally sending the right message at the right time" — which is exactly what behavioral segmentation is supposed to do.
3. Automated Reporting and Admin Notifications
This isn't customer-facing, but it's one of the highest-ROI workflows I build. Most businesses have a dozen little things they want to know on a regular schedule: how many new leads this week, which content pieces got the most engagement, who hasn't opened an email in 60 days, etc.
I use Claude Code to automate those reports and email them to the team. Every Monday morning, the sales team gets a summary of the previous week's lead activity. Every month, the CEO gets a dashboard export showing key email metrics. Every time a high-value contact (tagged as "warm lead") clicks a specific link, the sales rep gets a Slack notification.
It's all just scheduled scripts that query the database, format the data into a clean HTML email, and send it. No dashboards to log into. No reports to remember to pull. Just the information you need, when you need it, in your inbox.
The Technical Setup (Without Getting Too Deep in the Weeds)
If you want to build this yourself, here's the stack I use:
- Contact storage: SQLite database (simple, portable, no server required for small-to-medium lists)
- Email sending: AWS SES or SendGrid (both have generous free tiers and reliable delivery)
- Script execution: cron jobs on a cheap VPS or serverless functions (AWS Lambda, Vercel, etc.)
- Tracking: UTM parameters for clicks, 1x1 pixel for opens (standard email tracking approach)
- Unsubscribe handling: dedicated endpoint that updates contact status in database
The core workflow logic is just Python scripts that Claude Code helps you write. You describe what you want to happen ("send the Day 3 email to everyone who downloaded the lead magnet two days ago and hasn't clicked the CTA link yet"), and Claude Code generates the query and email logic. You test it on a small batch, refine the prompt if needed, and then let it run.
Is it more work than signing up for Mailchimp? Yes. Is it more flexible, more powerful, and cheaper at scale? Also yes.
What This Approach Isn't Good For
I need to be clear about the limits. If you're a non-technical business owner who wants a visual campaign builder and doesn't want to touch code, this isn't the right path. You should use ConvertKit or ActiveCampaign and pay for the convenience.
This approach makes sense if:
- You have specific workflow logic that's hard to replicate in standard platforms
- You're sending enough volume that platform costs are starting to hurt
- You want full control over your contact data and aren't comfortable with it living in someone else's system
- You're comfortable (or willing to learn) basic script troubleshooting
If none of those apply, stick with the platforms. They exist for a reason.
Real Results from Real Clients
The coaching client I mentioned earlier saw her email engagement rate go from 18% to 31% after we rebuilt her system. Why? Because we could finally send hyper-targeted content to small segments without worrying about hitting plan limits or paying extra for advanced segmentation features.
The SaaS client's trial conversion improvement (8% to 14%) was worth about $22,000 in additional MRR within the first quarter. The build cost was $3,500. ROI in about six weeks.
A local Vancouver retailer used this approach to automate post-purchase follow-ups based on product category. Different emails for people who bought skincare vs. makeup vs. fragrance. Open rates on those sequences averaged 42%, and they drove about 15% of repeat purchases in the first 90 days.
None of these results required magic. Just the right message, to the right person, at the right time — which is easier to execute when you control the entire workflow logic yourself.
Getting Started If You Want to Try This
If you're an agency owner, consultant, or in-house marketer who wants to explore this, here's where I'd start:
- Pick one simple workflow — a lead magnet sequence is the easiest
- Map out the logic in plain English (if this, then that)
- Use Claude Code to generate the database schema and the first email script
- Test it manually with a handful of test contacts before automating the triggers
The first one will take you longer than you expect. That's normal. By the third workflow, you'll have reusable templates and it'll go much faster.
If you want to see how this could work for your specific use case, I walk through it in detail during the AI Audit. And if you're not sure whether this approach makes sense for your business, the FAQ page covers most of the common questions I get.
The tools are here. The question is whether you want to own your email workflows or rent them.