I kept getting AI-written outreach that sounded great but claimed things the company never said. A better prompt didn’t fix it. What fixed it was treating the model like an agent inside a harness and checking its output with plain code.
Here’s the pattern:
- Read the lead’s website (Jina Reader, so JavaScript-heavy sites work too).
- Write: the model returns the email in parts (greeting, intro, why-you, bullets, ask, sign-off) as JSON, built around one fact from the site.
- Review: a second chain gets the draft plus the same research and has to verify every claim, then score it.
- Gate: a Code node runs deterministic checks with no AI involved: word count, exactly one question, the real first name in the greeting, banned words and stock phrases, placeholders, “we” when there’s no agency name, comments about a broken website.
- If the gate fails, the exact failed checks are fed back into the reviewer, up to 3 rounds. Code then assembles the parts into a clean HTML email with your signature, so the layout never drifts.
- The result goes to the sheet and into Gmail as a draft. Nothing is sent automatically.
The detail that made the biggest difference: the reviewer sees the gate’s check results as input, so it knows exactly what to fix instead of guessing. In my tests it went from regular invented claims to 8 out of 8 clean drafts on my last test sheet.
I’ve attached a free starter workflow that does the single-lead version (read site, write, quick quality check) so you can try the idea in five minutes. The full sheet-to-Gmail version with the review loop is a paid template if anyone wants it ready-made: AI Outreach Writer for n8n: Researched Cold Emails, Drafted in Gmail
Happy to answer questions about the gate checks or the prompts.
