0
How I Built an Autonomous Lead Reactivation Pipeline with n8n & LLMs (and Revived Dead CRM Contacts)
Most CRMs are graveyards for old, cold leads that stopped responding months ago. Manually re-engaging them takes too much time, and generic bulk email blasts usually just burn domain reputation.
To solve this, I designed and deployed an automated AI lead reactivation workflow that ingests dormant leads, drafts hyper-personalized re-engagement messages, verifies them before send, and classifies replies in real time.
The Tech Stack
- Orchestration: n8n
- Generation: OpenAI, drafting personalized outreach per lead
- Verification: Gemini, checking each draft for hallucinations and compliance before it ever goes out
- Delivery: Mailgun / Mailjet for email send, with subdomain routing to separate buyer and seller lead flows
- Alerts: Telegram, for real-time hot-lead notifications
Architecture & How It Works
Ingestion & Cleanup
⚬ Triggered by a CSV upload of dormant leads.
⚬ Parses and cleans the data, pulling past context and notes where available.
Generate → Verify
⚬ OpenAI drafts a short, high-context first-touch message per lead — the goal is a low-friction hook, not a recap of the whole relationship.
⚬ Before anything sends, a second model pass (Gemini) checks the draft for hallucinated claims and compliance issues. Nothing goes out unverified.
Send & Classify
⚬ Verified messages go out via Mailgun/Mailjet.
⚬ Inbound replies hit a webhook and get classified by intent — hot / warm / cold.
⚬ Hot replies trigger an instant Telegram alert so a real person can jump in fast.
Guardrails
⚬ Structured JSON outputs at every LLM node, so a malformed response can't silently corrupt downstream data.
⚬ Batch processing with fixes for iteration/loop bugs that show up at scale (n8n's SplitInBatches has sharp edges once you're past a handful of rows).
Key Takeaways & Lessons Learned
- Verify before you send, not after. A dedicated model pass just for hallucination/compliance checking catches bad drafts before they ever reach a lead's inbox — worth the extra latency.
- Structured output is king. Strict JSON schemas on LLM nodes prevented a whole category of downstream formatting bugs when writing back to lead records.
- Keep the first touch short. 2–3 sentence conversational hooks outperformed longer recap-style messages in early testing.
Still refining the generate/verify split and thinking about eventually moving parts of this off n8n into a custom service as it scales. Curious how others are handling verification steps in their own AI outreach pipelines — are you checking outputs before send, or leaning on prompt design alone to keep things honest?
Add a comment
0/2000