30-minute walkthrough · Google Meet · Free
Every B2B company has the same complaint: "We need qualified leads." The problem is rarely volume. Leads arrive from five different sources, land in five different places, and nobody knows which ones match the profile of someone who actually buys.
LinkedIn outreach generates connections who reply. Lead magnet posts generate commenters. Cold email generates opens and clicks. Paid ads generate form fills. Referrals generate warm introductions. All of these produce names. None of them tell you whether the person behind the name fits your ideal customer profile.
Manual qualification kills velocity. You pull a lead into a spreadsheet, open their LinkedIn, scan their company page, check their headcount, google their revenue, make a judgment call. Ten minutes per lead. At 50 leads a day, that's your entire workday gone before you've sent a single message.
This guide builds the system that replaces that process. You define your ICP criteria once. Leads enter from any source through a webhook. The system scrapes their LinkedIn profile, their company page, and their company website. An AI model scores them against your ICP definition. Qualified leads get routed to your sales pipeline. Unqualified leads get tagged and stored for later.
The entire flow runs inside N8N. You set it up once and it processes every lead that enters your system, from any channel, without you touching it.
Define your ICP matrix
The AI scoring engine needs a reference document to qualify against. Without it, the system guesses. The output quality is directly proportional to how specific your ICP definition is.
You have two paths here. If you've already completed the forensic AI research process and built your ICP memo from that, use it. That document is your best starting point because it's built on real market data and actual customer patterns.
If you don't have an ICP memo yet, build one now. The minimum viable version needs these fields defined:
- Industry (specific verticals, not broad categories)
- Company size by headcount (ranges, e.g., 10-50 or 50-200)
- Annual revenue range (if you can estimate or verify it)
- Geography (which countries or regions you serve)
- Tech stack signals (tools they use that indicate fit)
- Job title or function (decision-makers vs. influencers vs. champions)
- Seniority level
- Years of experience
- Department
- Have they engaged with your content?
- Did they come through outbound or inbound?
- Have they visited your website?
Once you have this defined, format it as a structured document. The AI model reads this document every time it qualifies a lead. Ambiguity here produces ambiguous scores.
Prompt 1: ICP matrix generator
Prompt 1 of 2Instructions for Claude Opus, Claude Sonnet, or Claude Haiku
Structures your ICP definition into a weighted scoring matrix that an AI qualification engine can use to score leads automatically.
You are an ICP Definition Architect for B2B companies. Your job is to take rough inputs about a company's ideal customer and produce a structured ICP scoring matrix that an AI qualification engine can use to score leads. INPUT 1: TARGET AUDIENCE [Describe who you sell to: industry, role, company size, geography] INPUT 2: CORE PROBLEM [What expensive problem do you solve for them?] INPUT 3: YOUR SOLUTION [What do you actually deliver? Be specific about the service or product.] INPUT 4: BEST CUSTOMERS [Describe your 3 best customers: what industry, what size, what role bought, what made them great] INPUT 5: WORST CUSTOMERS [Describe 2-3 customers who were a bad fit: what made them wrong for you?] Now generate: 1. A weighted scoring matrix with these categories: - Company fit (industry, size, revenue, geography) — assign point values to each match - Person fit (title, seniority, function) — assign point values - Behavioral fit (engagement source, content consumed, website visits) — assign point values - Disqualifiers (criteria that immediately mark a lead as unqualified regardless of score) 2. Scoring thresholds: - Qualified: [minimum score] - Needs review: [range] - Unqualified: [below threshold] 3. The complete ICP definition as a single text block that can be pasted into an AI qualification prompt. Format the output so it can be copied directly into an automation tool. No commentary. Just the matrix and the definition block.
Save the output. This becomes the reference document your N8N qualification node reads every time a lead enters the system.
Find leads on LinkedIn
Before the qualification engine matters, you need a source of leads to qualify. LinkedIn is the default starting point for B2B prospecting because every professional has a profile there, and the platform's search filters map directly to ICP criteria.
Regular LinkedIn search
The free version of LinkedIn search gives you filters for connection degree, location, current company, past companies, schools, industries, and keywords. Boolean operators (AND, OR, NOT) let you combine these into precise searches.
Filters for connection degree, location, current company, past companies, schools, industries, and keywords. Boolean operators (AND, OR, NOT) let you combine these into precise searches.
"head of growth" AND SaaS AND (founder OR "VP marketing") Adding NOT agency NOT freelance removes people who don't match.
Adds headcount, headquarters location, seniority level, years in current position, and whether they've posted on LinkedIn recently. The "posted on LinkedIn" filter is particularly valuable because it means the person is active and reachable.
Build your searches in tiers
Getting leads out of LinkedIn
Once you have search results, you need to extract them into a format your qualification system can process. If you use a LinkedIn automation tool for outbound campaigns, it can fire webhooks when leads connect, reply, or ignore your messages. Those webhooks feed directly into the N8N qualification flow.
If you run lead magnet posts on LinkedIn (see the LinkedIn Lead Magnet Posts guide in this library), automation tools extract every commenter's profile data and send it via webhook to your system.
Both sources converge on the same endpoint: a webhook that N8N listens to. The lead enters. The system qualifies.
30-minute walkthrough · Google Meet · Free
Build the N8N qualification flow
N8N is the engine. It receives leads from any source via webhook, enriches them with data, scores them against your ICP, and routes them based on the result.
The architecture
Setting up the webhook
Create a new workflow in N8N. Add a Webhook node as your trigger. This generates a unique URL. Every lead source you have (LinkedIn automation, form tools, ad platforms) sends data to this URL.
The webhook should expect these fields at minimum: first name, last name, LinkedIn profile URL. Everything else gets enriched in the next step.
Data enrichment
The qualification is only as good as the data feeding it. A name and LinkedIn URL alone aren't enough for the AI to score accurately. You need three data points per lead:
Use an API service to scrape this data. Services like RapidAPI offer LinkedIn scraping endpoints. The free tier handles about 25 leads per month. The paid tier ($40/month) handles 15,000 API calls, which covers any B2B operation comfortably.
In N8N, add HTTP Request nodes after the webhook that call the API for each data point. Pass the LinkedIn profile URL from the webhook payload. The API returns structured JSON with the fields you need.
The qualification node
This is where the AI scores the lead. Add an AI node in N8N that sends the enriched lead data plus your ICP matrix (from Step 1) to a language model.
For the AI model, use OpenRouter. OpenRouter aggregates 100+ language models behind a single API. This lets you test different models for qualification accuracy without switching providers. Start with a fast, affordable model. If accuracy isn't sufficient, step up to a more capable one.
You'll need an OpenRouter account and API key. Add a credit card to your account (they have free-tier models with usage limits, or paid models starting at fractions of a cent per call).
Prompt 2: Lead qualification scorer
Prompt 2 of 2Instructions for Claude Opus, Claude Sonnet, or Claude Haiku
The scoring prompt your N8N AI node sends to the language model for every lead. Paste your ICP matrix from Step 1 into the designated section.
You are a B2B lead qualification engine. Your job is to score an inbound lead against a defined ICP matrix and return a qualification verdict.
ICP MATRIX:
[Paste your complete ICP scoring matrix from Step 1 here]
LEAD DATA:
{{enriched_lead_data}}
Score this lead against the ICP matrix. For each category (company fit, person fit, behavioral fit), calculate the point score based on available data. If a data point is missing, note it and score conservatively.
Check all disqualifiers first. If any disqualifier matches, immediately return "Unqualified" regardless of score.
Return your response in this exact format:
SCORE: [total points] / [maximum possible]
STATUS: [Qualified / Needs Review / Unqualified]
COMPANY FIT: [score] — [one-line reasoning]
PERSON FIT: [score] — [one-line reasoning]
BEHAVIORAL FIT: [score] — [one-line reasoning]
DISQUALIFIERS: [None / list any that matched]
SUMMARY: [One paragraph explaining why this lead qualifies or doesn't, referencing specific data points]
SUGGESTED NEXT STEP: [What action to take with this lead based on their score and profile]
The {{enriched_lead_data}} variable gets replaced automatically by N8N with the JSON output from your enrichment nodes.
Routing
After the AI returns its verdict, add an IF node in N8N. Route based on the qualification status:
Add to your CRM, pipeline spreadsheet, or Google Sheet. Tag with "qualified" and the score. Trigger a Slack notification or email to your sales team.
Add to a review queue. These leads might qualify with more information or a different approach.
Store in a separate sheet or tag. Don't delete them. Some unqualified leads become qualified later when their company grows or their role changes.
Connect your lead storage
The qualification flow needs a place to write its results. Google Sheets works for getting started. For scale, move to Airtable, NocoDB, or Postgres.
Google Sheets setup
Create a Google Sheet with these columns:
Connect N8N to Google Sheets using the Google Sheets node. Map each output from your qualification flow to the correct column.
Limitations to know
Google Sheets has a hard limit of 60 write actions per minute. If you're processing more than 60 leads per minute (unlikely during normal operations, possible during large campaign spikes), the flow will error. For high-volume operations, use a database. NocoDB is free, self-hosted, and works like a spreadsheet with no API rate limits.
Feeding leads into the sheet
The N8N flow handles this automatically once connected. Every lead that hits the webhook gets enriched, scored, and written to the sheet without manual intervention.
For leads you find manually (browsing LinkedIn, getting referrals, meeting someone at an event), add them to the sheet yourself. Then trigger the N8N flow manually to run qualification on the new entries.
Build your post-qualification workflows
A qualified lead sitting in a spreadsheet generates zero revenue. What you do after qualification determines whether the system produces results.
Qualified leads from outbound
These are people you found through LinkedIn search or outbound campaigns. You reached out to them. The next step is personalized outreach that references what the AI found. Your CRM or outreach tool should pull from the qualified leads sheet. The AI reasoning field tells you exactly why this person matches your ICP. Use that in your first message. "I noticed you're running a 50-person team in logistics and recently posted about operational bottlenecks" converts better than a generic opener.
Qualified leads from inbound
These are people who commented on a lead magnet post, filled out a form, or clicked through an email. They've already shown intent. The qualification system confirms they're the right fit. Route these directly to your nurture sequence. If you have an email automation system (see the Evergreen Email Architect and Auto-Segmenting & Lead Scoring guides in this library), tag them and let the system handle the drip.
"Needs review" leads
These are borderline cases. Maybe the company size is slightly outside your range. Maybe the job title doesn't match perfectly but the company does. Review them manually once a week. A 10-minute review of 20 borderline leads is worth doing because some of your best clients won't fit the template perfectly.
Unqualified leads
Tag them with the reason for disqualification. Common reasons: wrong industry, too small, wrong geography, wrong role. Revisit the "too small" bucket quarterly. Companies grow. The startup that was 8 people when you qualified them might be 30 people six months later.
Notification setup
Add a final node to your N8N flow that pings you when a qualified lead enters. Use the Slack node, the Email node, or the Telegram node. The message should include: name, company, score, and the AI's one-paragraph reasoning. This lets you glance at your phone and know instantly whether to act on this lead now or let the system handle it.