Day 9. Series: Automations
I hate email newsletters. Seriously.
It's the same grind every time: you sit down to write, agonize over the subject line, the body, the "Buy" button. An hour later you've got one email. And you need five. Plus you have to segment the audience. Plus A/B-test the headlines.
I lived through all of it. Then I wired up an AI-plus-email-service combo. Now the whole sequence is ready in an hour. Here's how.
#What you'll need
Three pieces:
- an AI model with API access (Claude or GPT, for example);
- an email service with an API (Unisender, SendGrid, or similar);
- about 20 lines of glue code that connect the first to the second.
No complex integrations. No Zapier at $30/mo. Just a simple combo.
#Step 1: Write the AI prompt
The prompt is what matters most. Type "write a newsletter email" and you'll get mush. You need structure:
You are a copywriter. Write an email for [audience].
Subject: [topic].
Goal: [what the reader should do].
Format:
- Subject line (3 variants for A/B testing)
- Email body:
- Greeting
- Problem/pain (1 paragraph)
- Solution/offer (2 paragraphs)
- Call to action (1 button)
- P.S. with extra motivation
Tone: friendly, no corporate-speak, like talking to a colleague.
Banned phrases: "we are pleased to inform," "special offer," "innovative."Why so much detail? Without structure the AI starts "getting creative" — and you end up with spam. With structure you get a template that works.
#Step 2: The glue script
Here's the whole thing, about 20 lines:
import requests
# Config
AI_API_KEY = "your-key"
UNISENDER_API_KEY = "your-key"
# Generate the email
prompt = open("prompt.txt").read()
resp = requests.post(
"https://api.anthropic.com/v1/messages",
headers={"x-api-key": AI_API_KEY, "anthropic-version": "2023-06-01"},
json={
"model": "claude-sonnet-4-20250514",
"max_tokens": 1000,
"messages": [{"role": "user", "content": prompt}],
},
)
email_text = resp.json()["content"][0]["text"]
# Send it via Unisender
requests.post("https://api.unisender.com/en/api/sendEmail", json={
"api_key": UNISENDER_API_KEY,
"email": "test@example.com",
"sender_name": "Me & Agent",
"sender_email": "hello@iandagent.com",
"subject": "AI newsletter test",
"body": email_text,
})That's it. Run it, and the email goes out.
#Step 3: Scale it into a sequence
One email is fine. A sequence of five is what actually sells.
Sequence structure (tested across 3 projects):
| Day | Email type | What's inside |
|---|---|---|
| 0 | Welcome | Who you are + what the newsletter will cover |
| 2 | Useful content | A guide or article, free |
| 4 | Case study | A real example, with numbers |
| 6 | Offer | Product/service, price, call to action |
| 8 | Final push | "Last chance" or extra value |
Why this rhythm? Send every day and people unsubscribe. Send once a week and they forget you. Every other day hits the sweet spot.
Same script, just in a loop:
chain = [
{"day": 0, "topic": "Welcome email: meet iandagent"},
{"day": 2, "topic": "Handy guide: 5 types of AI agents"},
{"day": 4, "topic": "Case study: how I saved 40 hours in a month"},
{"day": 6, "topic": "Offer: a done-for-you AI agent setup"},
{"day": 8, "topic": "Final email: what you lose without automation"},
]
for step in chain:
prompt = f"Write an email: {step['topic']} (same format as above)"
email = generate_email(prompt)
schedule(email, delay_days=step["day"])Same hour of work — but now five emails instead of one.
#What it costs
Compare that to a copywriter: 5 emails × $30 = $150. The AI combo runs you a few euros in tokens. Roughly a 40x difference.
#The catch
AI emails sound like AI if you don't edit them. Always run the text through a humanizer (I have a dedicated skill for that) or just reread it and add a few things yourself:
- a living detail or a short story from real life;
- an uneven rhythm — a couple of short sentences next to the long ones;
- specifics instead of generic filler.
Skip this and the email lands in spam — not because it's bad, but because it looks like a hundred other AI newsletters.
#Bottom line
An email newsletter isn't magic. It's a template plus AI plus an email service. An hour to set up, half an hour a week to maintain. The agents handle the rest.
Next article: "Me & Agent: I Delegated My Social Media for a Week." Subscribe to @iandagent.