ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Build an n8n Lead Qualifier in 12 Lines
Tutorial

How to Build an n8n Lead Qualifier in 12 Lines

Build a complete lead qualification product in n8n where the scoring prompt is 12 lines. Webhook to CRM in under an hour.

Get Free API KeyAPI Docs

An r/n8n post showed a lead qualifier where the scoring prompt is 12 lines and that is the whole product. This tutorial replicates it: webhook → enrich with search API → LLM score → route to CRM.

Prerequisites

  • n8n instance (cloud or self-hosted)
  • Scavio API key
  • LLM API key

Walkthrough

Step 1: Create webhook trigger

n8n webhook node receives lead data (company name, domain, industry).

JSON
// n8n Webhook node
// Method: POST
// Path: /qualify-lead
// Body: { company: 'Acme Corp', domain: 'acme.com', industry: 'SaaS' }

Step 2: Enrich with Scavio

HTTP Request node calls Scavio to get company context.

JSON
// n8n HTTP Request node
// URL: https://api.scavio.dev/api/v1/search
// Method: POST
// Headers: x-api-key: {{$env.SCAVIO_API_KEY}}
// Body: { platform: 'google', query: '{{$json.company}} {{$json.industry}} reviews' }

Step 3: Score with 12-line prompt

OpenAI/Anthropic node scores the lead 1-10.

Text
Score this lead 1-10 based on:
- Company has clear budget signals (job posts, funding)
- Industry matches our ICP
- Company size suggests decision-making speed
- Online presence indicates tech-savviness
- Reddit/forum mentions suggest active community
- Recent news suggests growth or pain

Company: {{company}}
Context: {{enrichment_data}}

Return only: {score: N, reason: 'one sentence'}

Step 4: Route by score

Switch node routes: 8-10 → hot lead, 5-7 → nurture, 1-4 → archive.

Text
// n8n Switch node
// Condition 1: score >= 8 → Hot Leads (CRM)
// Condition 2: score >= 5 → Nurture (email sequence)
// Default: Archive

Step 5: Push to CRM

HTTP Request or native integration to your CRM.

Text
// n8n HTTP Request to CRM API
// Or native HubSpot/Pipedrive/Salesforce node

Python Example

Python
# The n8n workflow is no-code. Python equivalent:
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}

def qualify_lead(company, industry):
    context = requests.post('https://api.scavio.dev/api/v1/search', headers=H,
        json={'platform': 'google', 'query': f'{company} {industry} reviews'}).json()
    # LLM scores using the 12-line prompt
    # Route based on score

JavaScript Example

JavaScript
// n8n workflow is no-code. Same logic applies in JS.

Expected Output

JSON
n8n workflow: webhook → Scavio enrich → LLM score (12-line prompt) → route to CRM. Total enrichment cost: ~$0.01/lead.

Related Tutorials

  • How to Enrich Website Leads in n8n with Scavio
  • How to Build a B2B Real Estate Lead Engine with Scavio

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

n8n instance (cloud or self-hosted). Scavio API key. LLM API key. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Workflow

n8n 12-Line Lead Scoring Workflow

Read more
Solution

n8n Minimal Lead Qualifier

Read more
Best Of

Best Search APIs for n8n Lead Scoring Workflows (2026)

Read more
Workflow

Lead Scoring via Search Enrichment Workflow

Read more
Best Of

Best AI Lead Scoring Tools and Patterns in 2026

Read more
Solution

Lead Rubric Scoring Stack

Read more

Start Building

Build a complete lead qualification product in n8n where the scoring prompt is 12 lines. Webhook to CRM in under an hour.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy