Skip to main content
Innovatrix Infotech — home
How We Built an n8n + GPT Lead Qualification System That Runs 24/7 cover
AI Automation

How We Built an n8n + GPT Lead Qualification System That Runs 24/7

Most sales teams waste 60% of their time on leads that will never close. Here's how we built a $0/month n8n workflow that scores, qualifies, and routes leads automatically using GPT-4o.

Photo of Rishabh SethiaRishabh SethiaFounder & CEO24 September 202515 min read2.6k words
#n8n#gpt#lead qualification#ai automation#crm#sales automation#workflow automation

How We Built an n8n + GPT Lead Qualification System That Runs 24/7

Most leads are garbage. Not because the marketing is bad, but because nobody's sorting them.

A typical sales team spends 60% of its time on leads that will never convert. They call cold contacts, follow up on form submissions from students doing research, and chase tyre-kickers who just wanted a free PDF. Meanwhile, the hot lead — the one with budget, authority, and a real problem — sits in the inbox for 3 days because nobody flagged it.

We built a system that fixes this. It runs 24/7, costs $0/month in platform fees (n8n is self-hosted), and uses GPT-4o to score every incoming lead against a qualification rubric before a human ever sees it.

The result for one of our clients: 67% of unqualified leads automatically filtered out in the first 30 days. Their sales team went from chasing everything to only talking to leads that had a real chance of closing.

Here's exactly how we built it, including the full architecture, the qualification prompt, edge case handling, and the workflow JSON you can import into your own n8n instance.

What You'll Learn

  • The full system architecture (form → webhook → n8n → GPT scoring → CRM update → Slack alert)
  • The BANT-derived qualification prompt with scoring rubric
  • How to handle edge cases (incomplete forms, foreign languages, bot submissions)
  • CRM write-back options (Notion, Airtable, HubSpot)
  • Estimated build time and cost
  • Real client results from the first 30 days

Prerequisites

  • n8n self-hosted on a VPS (DigitalOcean, AWS, or Railway) or n8n Cloud
  • OpenAI API key with GPT-4o access
  • A web form that sends webhook data (Typeform, Tally, or a custom form)
  • A CRM or database (Notion, Airtable, Google Sheets, or HubSpot)
  • Optional: Slack workspace for real-time alerts

If you don't have n8n set up yet, we have a guide on self-hosting n8n on AWS. The total hosting cost for an n8n instance that handles this workflow is ₹800–1,500/month on DigitalOcean.

The Full System Architecture

Here's the end-to-end flow:

[Web Form Submission]
        │
        ▼
[Webhook → n8n Trigger]
        │
        ▼
[Data Validation Node]
    │         │
  Valid     Invalid → [Log & Discard]
    │
    ▼
[GPT-4o Qualification Scoring]
        │
   ┌─────┼─────┐
   │     │     │
  Hot   Warm   Cold
  (8-10) (5-7) (0-4)
   │     │     │
   ▼     ▼     ▼
[Slack  [CRM   [CRM
 Alert]  Update] Update]
   │     │     │
   ▼     ▼     ▼
[CRM: Move to  [Nurture  [Archive
 'Hot Leads']   Sequence]  Row]

Every lead hits the same pipeline. No human decides who gets followed up first. The system scores and routes automatically.

Step 1: Set Up the Webhook Trigger

Create a new workflow in n8n. Add a Webhook node as the trigger.

Configuration:

  • HTTP Method: POST
  • Path: /lead-qualification (or whatever you prefer)
  • Authentication: Header Auth (add a secret token to prevent spam submissions)
  • Response Mode: "When Last Node Finishes" (so your form gets a confirmation response)

Copy the webhook URL and configure your web form to POST submission data to it. If you're using Typeform, this is under Integrations → Webhooks. For Tally, it's in the form settings under Notifications.

The webhook receives a JSON payload like:

{
  "name": "Priya Sharma",
  "email": "priya@examplecompany.com",
  "company": "Example Corp",
  "phone": "+91-9876543210",
  "budget": "3-5 lakhs",
  "timeline": "Next 2 months",
  "project_description": "We need a Shopify store for our Ayurveda brand launching in Q1. About 200 products. Need payment gateway integration for India and UAE.",
  "how_did_you_find_us": "Google search"
}

Step 2: Data Validation

Add an IF node after the webhook to validate the submission.

Validation checks:

  1. Email is not empty and contains "@"
  2. Email is not a disposable domain (check against a list: guerrillamail, tempmail, throwaway, etc.)
  3. Project description is longer than 20 characters (filters out accidental submissions and bots)
  4. Name is not empty

For invalid submissions: Route to a Set node that logs the rejected lead to a Google Sheet (for auditing) and returns a generic "Thank you" response. Don't tell bots or spammers why their submission was rejected.

For valid submissions: Continue to the GPT scoring node.

Step 3: The GPT-4o Qualification Prompt

This is the core of the system. Add an HTTP Request node that calls OpenAI's chat completion API.

API Configuration:

  • Method: POST
  • URL: https://api.openai.com/v1/chat/completions
  • Authentication: Bearer Token (your OpenAI API key)
  • Body (JSON):
{
  "model": "gpt-4o",
  "temperature": 0.2,
  "response_format": { "type": "json_object" },
  "messages": [
    {
      "role": "system",
      "content": "You are a lead qualification assistant for Innovatrix Infotech, a software development company that builds Shopify stores, custom web apps, and AI automation systems. Your job is to score incoming leads on a 0-10 scale based on the BANT framework.\n\nScoring rubric:\n\nBUDGET (0-3 points):\n- 0: No budget mentioned or clearly cannot afford services (students, personal projects under 10K)\n- 1: Budget mentioned but very low for the scope described (under 50K for a full Shopify build)\n- 2: Budget is reasonable for the scope (50K-3L for Shopify, 3-10L for custom builds)\n- 3: Budget exceeds typical project cost or budget is explicitly not a concern\n\nAUTHORITY (0-2 points):\n- 0: Appears to be a student, researcher, or someone without buying authority\n- 1: Unclear role but could be a decision-maker\n- 2: Clearly a founder, CTO, marketing head, or someone with purchasing authority\n\nNEED (0-3 points):\n- 0: No clear project need described or extremely vague\n- 1: General need but no specifics (we need a website)\n- 2: Specific project with clear requirements (200 products, Shopify store, India + UAE payments)\n- 3: Urgent, well-defined need with specific technical requirements and timeline pressure\n\nTIMELINE (0-2 points):\n- 0: No timeline or timeline is 6+ months out\n- 1: Timeline is 2-6 months\n- 2: Timeline is within 2 months (urgent)\n\nRespond with a JSON object containing:\n- score (integer 0-10)\n- category (hot/warm/cold)\n- budget_score, authority_score, need_score, timeline_score (individual scores)\n- reasoning (2-3 sentence explanation of the score)\n- suggested_action (what the sales team should do next)\n- red_flags (array of any concerns, empty array if none)"
    },
    {
      "role": "user",
      "content": "Qualify this lead:\n\nName: {{$node['Webhook'].json.name}}\nEmail: {{$node['Webhook'].json.email}}\nCompany: {{$node['Webhook'].json.company}}\nPhone: {{$node['Webhook'].json.phone}}\nBudget: {{$node['Webhook'].json.budget}}\nTimeline: {{$node['Webhook'].json.timeline}}\nProject Description: {{$node['Webhook'].json.project_description}}\nSource: {{$node['Webhook'].json.how_did_you_find_us}}"
    }
  ]
}

Why temperature 0.2? Lead scoring needs consistency. The same lead submitted twice should get the same score. Low temperature reduces creative variation, which is exactly what you want for classification tasks.

Why JSON response format? It forces GPT to return structured data that downstream nodes can parse reliably. No more regex-ing scores out of prose responses.

The response looks like:

{
  "score": 8,
  "category": "hot",
  "budget_score": 2,
  "authority_score": 2,
  "need_score": 3,
  "timeline_score": 1,
  "reasoning": "Clear project scope with 200 products, dual-market payment needs (India + UAE), and reasonable budget range. Company email suggests business legitimacy. Timeline of 2 months indicates urgency.",
  "suggested_action": "Call within 2 hours. This is a well-defined Shopify project with international scope. Prepare examples of India + UAE Shopify stores.",
  "red_flags": []
}

Step 4: Route by Score

Add a Switch node after the GPT response that routes based on the score category:

Hot leads (score 8-10):

  1. Send immediate Slack notification to the sales channel with lead details + GPT reasoning
  2. Create/update CRM record with status "Hot Lead"
  3. Send an auto-acknowledgement email: "Thanks for reaching out. One of our team will call you within 2 hours."

Warm leads (score 5-7):

  1. Create/update CRM record with status "Warm Lead"
  2. Add to email nurture sequence (if you have one set up)
  3. Send auto-acknowledgement email with a link to book a call: "Book a time that works for you"

Cold leads (score 0-4):

  1. Create/update CRM record with status "Cold" and GPT reasoning
  2. Send a polite auto-response with helpful resources (blog links, pricing guide)
  3. No sales follow-up unless the lead re-engages

Step 5: CRM Write-Back

The system needs to write qualification data back to wherever your team tracks leads. Here's how we handle the three most common options:

Notion (our preference for small teams): Use n8n's Notion node to create a new database entry. Map fields: Name, Email, Company, Score, Category, GPT Reasoning, Suggested Action, Red Flags, Submission Date.

Airtable (good for mid-size teams): Use the Airtable node. Same field mapping. Airtable's automations can trigger additional workflows from the lead status field.

HubSpot (for teams already on HubSpot CRM): Use the HubSpot node to create or update a contact. Map the score to a custom property. Set the lead status based on the category. This integrates directly with HubSpot's sales pipeline.

Google Sheets (minimum viable CRM): For teams just starting out, a Google Sheet with the right columns works surprisingly well. We've had clients run on Sheets for 6+ months before migrating to a proper CRM.

Step 6: Handling Edge Cases

Every automation system breaks on edge cases. Here's how we handle the common ones:

Incomplete form data: If the project description is empty but other fields look legitimate (business email, real company name), the system assigns a default score of 4 (warm-cold boundary) and flags it for human review with the note "Incomplete submission — may be worth a quick email to gather more info."

Foreign language submissions: GPT-4o handles multilingual input well. We've processed leads in Hindi, Arabic, and Mandarin without issues. The system prompt instructs GPT to translate the submission internally and score in English. For our clients serving the GCC market, Arabic submissions are common.

Bot submissions: The data validation node catches most bots (empty fields, disposable emails, gibberish text). For sophisticated bots, we add a honeypot field to the form — a hidden field that humans can't see but bots fill in. If the honeypot has a value, the submission is discarded.

Duplicate submissions: We check the email against existing CRM records. If a lead already exists, we update the existing record instead of creating a duplicate. If they submitted a second time with more detail, the system re-scores and updates.

API failures: The workflow includes retry logic on the OpenAI API call (3 retries with exponential backoff). If GPT is down, the lead is saved to the CRM with a "Pending Qualification" status and a Slack alert goes out for manual review.

Build Time and Cost

Time to build this from scratch following this guide: 3–4 hours for someone comfortable with n8n. 6–8 hours if you're learning n8n as you go.

Running costs:

  • n8n self-hosted: ₹800–1,500/month (DigitalOcean Droplet or AWS Lightsail)
  • OpenAI API: ~$0.01–0.03 per lead scored (GPT-4o pricing). At 500 leads/month, that's $5–15/month.
  • Slack: Free tier works fine
  • CRM: Depends on choice (Notion free tier, Airtable free tier, or HubSpot free CRM)

Total monthly cost: Under ₹2,000/month for a system that would cost ₹40,000–60,000/month as a SaaS product.

Real Results: First 30 Days

We deployed this system for a client receiving 80–120 inbound leads per month from their website and Google Ads campaigns.

Before the system:

  • Sales team manually reviewed every lead (average 4 minutes per lead)
  • Response time to hot leads: 8–24 hours
  • 60%+ of sales calls were with unqualified leads
  • No data on lead quality patterns

After 30 days:

  • 67% of leads automatically classified as cold or unqualified — routed to nurture, not sales calls
  • Response time to hot leads: under 15 minutes (Slack alerts trigger immediate action)
  • Sales team only calling leads scored 7+
  • Clear data showing which traffic sources produce highest-quality leads (Google Ads for "Shopify development" keywords had 3x higher lead quality than social media traffic)

The sales team went from 15 qualification calls per week to 5–7 high-quality conversations. Close rate went up because they were only talking to people who were likely to buy.

This is the same type of AI automation we build for clients across India, Dubai, and Singapore. The specific scoring rubric changes per business, but the architecture is the same.

Extending the System

Once the basic qualification workflow is running, here are the most valuable extensions:

Lead enrichment: Before GPT scoring, add a node that enriches the lead with company data from LinkedIn or Clearbit. Company size, industry, and funding stage improve scoring accuracy significantly.

Sentiment analysis: Add a second GPT call that analyses the tone of the project description. Urgency language ("ASAP", "we're behind schedule", "need this yesterday") gets a timeline boost even if the stated timeline field says "3–6 months."

Auto-scheduling for hot leads: Instead of just alerting the sales team, have the system automatically send a Calendly or Cal.com link with pre-filled context. Hot leads who can self-schedule convert at higher rates than those waiting for a callback.

Weekly digest: A scheduled n8n workflow that runs every Monday morning, summarising the past week's lead quality: total leads, score distribution, top sources, and conversion from qualified to booked call.


Frequently Asked Questions

Written by

Photo of Rishabh Sethia
Rishabh Sethia

Founder & CEO

Rishabh Sethia is the founder and CEO of Innovatrix Infotech, a Kolkata-based digital engineering agency. He leads a team that delivers web development, mobile apps, Shopify stores, and AI automation for startups and SMBs across India and beyond.

Connect on LinkedIn
Get started

Ready to talk about your project?

Whether you have a clear brief or an idea on a napkin, we'd love to hear from you. Most projects start with a 30-minute call — no pressure, no sales pitch.

No upfront commitmentResponse within 24 hoursFixed-price quotes