Built by Cecilia Wangui Mutero | AI Automation Engineer
A fully automated, end-to-end AI-powered lead qualification pipeline that:
- ✅ Captures inbound leads from a Tally web form via webhook
- ✅ Uses Groq LLaMA 3.1 AI to score and qualify each lead (1–100)
- ✅ Routes qualified leads to HubSpot CRM automatically
- ✅ Sends instant Gmail email notifications with full lead details
- ✅ Posts real-time Slack alerts to the
#qualified-leadschannel - ✅ Silently drops unqualified leads with zero manual intervention
- ✅ Runs 24/7 on autopilot — zero human involvement required
All tools used are on free tiers. Total infrastructure cost: $0.
┌─────────────────┐
│ Tally Form │ ← Lead submits inbound form
└────────┬────────┘
│ POST webhook
▼
┌─────────────────┐
│ n8n Webhook │ ← Receives and parses form data instantly
│ (Trigger Node) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Groq LLaMA 3.1 │ ← AI scores lead 1-100 based on need + budget
│ AI Qualifier │ Returns: { status, lead_score }
└────────┬────────┘
│
▼
┌─────────────────┐
│ Parse + Extract│ ← Cleans AI response, extracts contact fields
│ (Code Node) │
└────────┬────────┘
│
▼
┌─────────────────────────────────┐
│ Check If Qualified │ ← Routes based on AI decision
│ (If Node) │
└──────┬──────────────────┬───────┘
│ TRUE │ FALSE
▼ ▼
┌──────────────┐ ┌──────────────┐
│ HubSpot CRM │ │ Drop Lead │ ← Silently discarded
│ Create Contact│ │ (No-Op) │
└──────┬───────┘ └──────────────┘
│
▼
┌──────────────┐
│ Gmail Alert │ ← Full lead details + AI score emailed instantly
└──────┬───────┘
│
▼
┌──────────────┐
│ Slack Alert │ ← Team notified in #qualified-leads channel
└──────────────┘
| Tool | Role | Cost |
|---|---|---|
| n8n | Workflow orchestration engine | Free (self-hosted) |
| Tally | Inbound lead capture form | Free tier |
| Groq (LLaMA 3.1 8B Instant) | AI lead scoring engine | Free tier |
| HubSpot | CRM — contact creation | Free tier |
| Gmail | Email notification delivery | Free |
| Slack | Team alert channel | Free tier |
| ngrok | Webhook tunneling (dev) | Free tier |
The Groq LLaMA 3.1 model acts as a strict qualification engine. It receives:
- The lead's stated need (what they want help with)
- Their declared budget
And returns a clean JSON object:
{
"status": "qualified",
"lead_score": 87
}Qualification rules:
- Budget above $500 + clear business need =
qualified - Vague need or budget below $500 =
unqualified - Score range: 1–100 (higher = stronger lead)
The AI prompt is engineered to return raw JSON only — no markdown, no explanations, no filler text.
- n8n installed (self-hosted or cloud)
- Groq API key (free)
- HubSpot account (free CRM)
- Tally account (free forms)
- Slack workspace (free)
- Gmail account with OAuth2 enabled
- ngrok for local webhook tunneling
git clone https://github.com/CeciliaMutero/ai-lead-qualification-system.git
cd ai-lead-qualification-system- Open your n8n instance at
http://localhost:5678 - Click + → New Workflow
- Click the three-dot menu → Import from JSON
- Paste the contents of
workflow.json→ click Import
- Go to console.groq.com → API Keys → Create
- In n8n: Groq Lead Qualifier node → Authentication → Header Auth
- Name:
Authorization - Value:
Bearer YOUR_GROQ_KEY
- Name:
- Go to HubSpot → Settings → Integrations → Private Apps → Create
- Add scopes:
crm.objects.contacts.write,crm.objects.contacts.read - Copy the token → paste into n8n HubSpot credential
- Go to Google Cloud Console
- Enable Gmail API
- Create OAuth2 credentials → connect in n8n
- Go to api.slack.com/apps → Create App
- Add scopes:
chat:write,chat:write.public,channels:read - Install to workspace → copy Bot Token (
xoxb-...) → paste into n8n
Create a Tally form with exactly these fields:
| Field Label | Field Type |
|---|---|
Name |
Short answer |
Email |
|
What do you need help with? |
Long answer |
Budget |
Short answer |
- Start ngrok:
./ngrok http 5678 - Copy your ngrok URL (e.g.
https://abc123.ngrok-free.app) - In Tally → Integrate → Webhooks → Add endpoint:
https://abc123.ngrok-free.app/webhook/inbound-leads
- In n8n, toggle the workflow Active (top right)
- Submit a test form entry
- Watch the pipeline execute end-to-end ✅
Input:
Name: Hellen Moo
Email: hellenmoo@gmail.com
Need: I need help with my website
Budget: $5000
AI Response:
{ "status": "qualified", "lead_score": 90 }Outcome:
- ✅ HubSpot contact created automatically
- ✅ Gmail notification sent with full details + AI score
- ✅ Slack alert posted to #qualified-leads
Input:
Name: Waa Ree
Email: waaree@gmail.com
Need: I need help with hubspot
Budget: $55
AI Response:
{ "status": "unqualified", "lead_score": 25 }Outcome:
- ❌ No HubSpot contact
- ❌ No Gmail notification
- ❌ No Slack alert
- ✅ Lead silently dropped
ai-lead-qualification-system/
│
├── workflow.json # Complete n8n workflow (import-ready)
├── README.md # This file
├── screenshots/
│ ├── n8n-canvas.png # Full workflow view
│ ├── gmail-alert.png # Email notification sample
│ ├── slack-alert.png # Slack message sample
│ └── hubspot-contact.png # CRM contact created
└── docs/
└── setup-guide.md # Detailed setup instructions
The demo shows:
- Live Tally form submission
- n8n workflow executing in real-time
- Gmail notification arriving instantly
- Slack alert posting to the team channel
- HubSpot contact automatically created
- Unqualified lead correctly dropped with zero notifications
This system can be extended to support:
- WhatsApp notifications via Twilio or WhatsApp Cloud API
- Calendar booking via Google Calendar integration
- SMS alerts via Africa's Talking API
- Multi-step AI qualification with follow-up questions
- Lead scoring dashboard via Google Sheets or Airtable
- CRM pipeline automation — move leads through HubSpot deal stages automatically
- Industry-specific scoring — tune AI prompt for clinics, real estate, salons, etc.
This system is ideal for:
- Service businesses (clinics, salons, law firms, real estate agents)
- Freelancers managing multiple client inquiries
- Sales teams who waste time on unqualified prospects
- Startups that need automated lead management without expensive CRM tools
Cecilia Wangui Mutero — Full-Stack Engineer & AI Automation Specialist based in Nairobi, Kenya.
Specializing in:
- AI workflow automation (n8n, Groq, LangChain)
- Voice AI agents (Vapi.ai, ElevenLabs)
- Full-stack development (Next.js, FastAPI, Django)
- CRM integrations (HubSpot, Airtable, Google Sheets)
📧 cecilmutero66@gmail.com
🔗 LinkedIn
🐙 GitHub
Available for freelance automation projects and full-time remote roles.
MIT License — feel free to use, modify, and build on this project.
⭐ If this project helped you, please give it a star!



