An AI system that writes, sends, and improves marketing content — on its own
Give it a topic and an audience. It drafts a blog, writes a tailored newsletter for
each persona, sends them through a CRM, tracks what performs, and uses the results to decide what to
publish next — a loop that gets sharper every round.
by I-Wen (Elaine) Lee · demonstrated on two real companies — Zip & Shopify
· Python · Claude · HubSpot · runs with zero API keys
How it works
One topic in. A self-improving loop out.
The problem
Content marketing is usually a broken manual loop
Companies grow inbound through content, but in practice three things quietly break it:
01
Segmentation lives in someone's head
A CFO and a first-time founder care about different things, but tailoring per audience is slow — so teams default to one generic blast.
02
The steps don't talk
Ideate, write, send, and measure are disconnected. Whoever picks next week's topic rarely knows what actually performed last week.
03
Results don't feed back
Data gets reported and forgotten. Every week starts from scratch instead of getting smarter.
The hypothesis: with an LLM and a CRM, this loop can become a system that learns — where engagement automatically shapes what gets written next.
My approach
The judgment drives the automation — not the other way around
The hard part of marketing isn't sending email; it's knowing who to say what to. So the
one thing the AI never decides is the segmentation. I define each audience and its angle; the engine
executes that judgment at scale. To prove it isn't hard-coded to one case, the same engine runs two very
different companies — and it segments them differently, because the right logic depends on the market:
Zip — enterprise procurement
Segments by · organizational role
A large company has many distinct stakeholders.
Procurement Leader (champion)
Finance Leader (economic buyer)
Business Requester (end user)
Shopify — SMB commerce
Segments by · business stage
One owner wears every hat — so maturity matters more than title.
First-time Founder
Growing DTC Brand
Established Retailer
Three engineering decisions, each with a marketing reason: the whole pipeline
runs with no API keys (anyone can run it in one command, yet the real Claude + HubSpot integrations are in the code);
engagement is simulated over a full segment audience the way a real email tool reports it; and adding a company is a
single-file change — which is what makes it a reusable system, not a one-off.
Proof it's reusable
Same engine, two very different outputs
Swap one company-profile file and the pipeline changes who it targets, what it says, how it segments — and
which audience wins. Nothing else in the code changes.
Real output
What one run actually produces
These aren't mockups — the pipeline generates a self-contained report on every run. Below are the real
reports for each company, side by side. Same template; entirely different audiences, content, and insights.
Run report — Zip top segment: Finance Leader · 16.4% click
Campaign: “How to scale procurement without scaling headcount” · mock data (no API keys) · engagement simulated
Stage 1 · Generate
One topic in → a blog + three tailored newsletters
BLOGHow to scale procurement without scaling headcount
The 'finance_leader' segment led on engagement with a 16.4% click rate — about 9.1 points higher than 'requester'. Open rates were healthy across segments, so the gap is driven by message-to-offer fit rather than subject lines.
Recommendations
→ Double down on the angle that worked for 'finance_leader' — lead with the concrete ROI/time-saved hook in future sends.
→ Rework the 'requester' variant: swap the abstract framing for a specific, visual case study or before/after example.
→ Add a single, unmissable primary CTA per email to lift click-through.
Stage 4 · Optimize
What to publish next
→ From cost center to strategic partner: redefining the procurement mandate
→ The intake front door: why request experience drives policy adoption
→ AI agents in procurement: where to start and what to automate first
→ Measuring cycle time: the metric that proves procurement is scaling
A/B HEADLINE OPTIONS
Scale Procurement Without Scaling HeadcountThe Self-Service Procurement Playbook for High-Growth TeamsStop Being the Bottleneck: Orchestration Over Tickets
Why: Finance Leader (CFO / Finance Ops) drove the strongest click-through (16.4%), so the next slate leans into the angle that resonated with that segment.
↻ These suggestions feed back into Stage 1 as the next run's input — the loop that makes each round sharper.
Run report — Shopify top segment: Growing DTC Brand · 20.4% click
Campaign: “What separates stores that scale from stores that stall” · mock data (no API keys) · engagement simulated
Stage 1 · Generate
One topic in → a blog + three tailored newsletters
BLOGWhat separates stores that scale from stores that stall
The 'growing_brand' segment led on engagement with a 20.4% click rate — about 11.2 points higher than 'omnichannel_retailer'. Open rates were healthy across segments, so the gap is driven by message-to-offer fit rather than subject lines.
Recommendations
→ Double down on the angle that worked for 'growing_brand' — lead with the concrete ROI/time-saved hook in future sends.
→ Rework the 'omnichannel_retailer' variant: swap the abstract framing for a specific, visual case study or before/after example.
→ Add a single, unmissable primary CTA per email to lift click-through.
Stage 4 · Optimize
What to publish next
→ The first-100-orders playbook: launching without tool overload
→ Email flows that turn one-time buyers into repeat customers
→ Knowing your numbers: the 4 metrics every growing store should watch
→ Going omnichannel without doubling your workload
A/B HEADLINE OPTIONS
What Separates Stores That Scale From Stores That StallSystems Beat Hustle: Growth Advice for Every StageThe Repeat-Customer Engine Most Stores Never Build
Why: Growing DTC Brand Owner (scaling up) drove the strongest click-through (20.4%), so the next slate leans into the angle that resonated with that segment.
↻ These suggestions feed back into Stage 1 as the next run's input — the loop that makes each round sharper.