Optimize Cold Email Copy with Claude, Instantly, and Google Sheets
Inspired by Karpathy's Autoresearch, this workflow treats your cold email campaigns as continuous experiments. Instead of writing copy once and hoping for the best, it runs an automated optimization loop that evolves your emails based on real performance data.
How it works
- Runs on a schedule (every 6 hours)
- Pulls live campaign stats (open rate, reply rate) from Instantly
- Reads the current champion and challenger variants from Google Sheets
- Reads the full experiment history (last 10 rounds)
- Checks if both variants have enough data (200+ sends each)
- If below threshold, exits and waits for the next run
- If above threshold, feeds everything to Claude: both variants, metrics, experiment history, and the cold email program rules
- Claude declares a winner, explains why, and generates a new challenger with a specific hypothesis
- Safety check: if reply rate drops below the floor threshold, pauses and sends a Telegram alert instead of continuing
- Logs the full experiment (variants, metrics, winner, reasoning, change type) to Google Sheets
- Promotes winner, deploys new challenger to Instantly
What makes it different
- Learns across rounds, not just the current test. Claude sees the last 10 experiments and identifies patterns over time.
- Program doc driven. Brand voice, hard rules, and constraints live in a Google Sheet, not hardcoded in prompts. Update the rules without touching the workflow.
- Structured change tracking. Every experiment logs what specifically changed (subject, CTA, tone, length, opener style) so you can filter by change type.
- Safety floor. If reply rate drops below your minimum, the system pauses and alerts you instead of running bad copy.
What you need
- Instantly account with active campaign
- Claude API key (Anthropic)
- Google Sheets (two tabs: Active, Experiments + one tab: Program)
- Telegram bot (for safety alerts)
- Enough send volume for meaningful data (200+ sends per variant)
Google Sheets setup
Active tab (A:F): Variant | Subject Line | Email Body | Sends | Open Rate | Reply Rate
Experiments tab (A:M): Experiment ID | Date | Champion Copy | Challenger Copy | Champion Subject | Challenger Subject | Champion Sends | Challenger Sends | Champion Reply Rate | Challenger Reply Rate | Winner | Change Type | Reasoning
Program tab (A:B): Rule Name | Rule Content (brand voice, constraints, off-limits topics, max word count, required variables, etc.)
Environment variables
- OPTIMIZER_SHEET_ID
- REMOVEFAST_CAMPAIGN_ID
- INSTANTLY_API_KEY
- ANTHROPIC_API_KEY
- TELEGRAM_BOT_TOKEN
- TELEGRAM_CHAT_ID
- REPLY_RATE_FLOOR (default: 1.0)