Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

n8n orchestrates, LangGraph writes, a human approves: an AI cold-email pipeline that can't spam

Description and use

An AI cold‑email pipeline using n8n for deterministic steps and LangGraph for LLM tasks, enforcing sourced claims, code‑based checks, and human approval to avoid spam and domain damage.

Problem

AI SDR demos often send many unverified emails, damaging domains and containing unsupported claims.

Outcome

The pipeline achieved 26/26 checks in tests, processed 10 fake leads with 6 drafts awaiting approval, 2 disqualified, 1 deduped, and 1 blocked by unsubscribe list, demonstrating reliable, spam‑free cold‑email generation.

Workflow

  • Trigger email generation (manual, schedule, webhook)
  • Use Apollo to find prospects and enrich emails
  • Verify emails with Hunter
  • Deduplicate against CRM (HubSpot or Google Sheet)
  • Apply qualification filters
  • Generate research note via LangGraph
  • Draft email from research note via LangGraph
  • Run code‑based checker to validate claims, numbers, placeholders, unsubscribe line, and length
  • If draft fails, rewrite up to two times
  • Flag draft as needs_human_fix after two failures
  • Create approval link per draft
  • Send email via SendGrid (or Gmail/SMTP) behind SEND_ENABLED flag

Evidence

Every claim in an email must come from sourced data, quoted from what the APIs returned.

Source

A rule checker rejects bad drafts and sends them back for a rewrite (max 2 times).

Source

Nothing is sent until a human clicks Approve.

Source

21 pytest tests for the LangGraph service, 8 JS tests for the n8n Code nodes

Source

10 fake leads end to end: 6 drafts waiting for approval, 2 disqualified, 1 deduplicated, 1 blocked by the unsubscribe list

Source

  • Record date: 2026-10-25T14:41:22.895Z