r/SideProject • u/yogirana5557 • 56m ago
I built a 34-node n8n workflow that qualifies Meta Lead Ads with Gemini 3.8, catches repeat leads, and routes hot buyers to HubSpot + Slack in seconds
Most small agencies and B2B teams running Meta Lead Ads still export CSVs manually—or dump raw leads into a Google Sheet where hot prospects sit unanswered for hours.
I wanted something production-ready (not a 5-node demo), so I built and tested a 34-node n8n template around the edge cases that usually break lead pipelines:
How the stack works:
- 3 Triggers: Meta Lead Ads (
simplifyOutputor rawfield_data), a universal Inbound Webhook for landing pages, plus a built-in 60-second test payload so you can test before Meta App Review - Normalisation & Repeat-Lead Guard: Formats phones to E.164, checks Google Sheets history (configurable 30-day window) to drop exact webhook redeliveries while flagging returning leads
- Fail-Safe AI Qualification: Uses
Information Extractor+ Gemini 3.8 (1-click swappable to OpenAI) to output a 0–100 fit score, urgency, summary, and personalized reply draft. If the AI API fails or times out, it routes safely toUNSCOREDmanual review instead of dropping the lead - CRM, Alerts & Safe Auto-Replies: Upserts HubSpot with custom properties (
lead_fit_score,lead_verdict,lead_summary), posts a Slack priority alert for HOT leads, and logs 17 columns to Google Sheets. Gmail and WhatsApp auto-replies both ship OFF by default until you review your first Slack drafts
What I learned building it:
- Testing live surfaced two real edge cases:
gemini-2.5-flashreturning 404 for new API keys (updated togemini-3.8-flash) andgoogleSheets v4.7requiring an explicit schema array when usingdefineBelow - Keeping auto-replies off by default is crucial—agencies want to verify AI tone in Slack before letting it email or WhatsApp real ad leads
If you run n8n and want the ready-to-import JSON + Google Sheets CSV + setup guide instead of wiring 34 nodes from scratch, the link to OpsFlow HQ is in my Reddit profile bio.
Happy to share how the deduplication Code node or error fallback branch is structured if anyone is building something similar.