Automated lead enrichment with n8n: from a bare email to a full profile
Published 27 July 2026 · 7 min read
A lead just filled in your form: "Marie", "marie@example-industries.com", and a two-line message. That's it. To decide whether this lead deserves a call within the hour or a bulk email next week, your sales rep opens LinkedIn, googles the company name, hunts for headcount, sector, recent news — ten to fifteen minutes per lead, times twenty submissions a day. That research work is entirely automatable. This article builds, piece by piece, an n8n pipeline that starts from a bare business email and delivers a complete profile to the CRM — domain, line of business, size, official registry data — less than a minute after submission.
Enrich first, qualify second
Enrichment sits before qualification, and the two do different jobs. Our guide to qualifying inbound leads with AI shows how to score a lead from its message; but a score is only as good as its input data. "We're looking for a quoting solution" doesn't carry the same weight coming from a one-person shop or a 200-person mid-market company — and that information never appears in the form. Enrichment supplies exactly the context that makes scoring meaningful: sector, size, company age, buying signals.
The pipeline's entry point is the same as for qualification: a webhook receiving the form submission — see our complete guide to n8n webhooks for setup and security, or a native Form Trigger if you'd rather host the form inside n8n. From there, four steps: extract the domain, visit the website, query the databases, consolidate and push to the CRM.
Step 1 — Extract the domain and filter out personal emails
Everything starts from the email's domain. A Code node (n8n-nodes-base.code) does the job:
const email = ($json.email || '').toLowerCase().trim();
const domain = email.split('@')[1] ?? '';
const personalDomains = [
'gmail.com', 'outlook.com', 'hotmail.com', 'live.com',
'yahoo.com', 'icloud.com', 'protonmail.com', 'proton.me',
'aol.com', 'gmx.com', 'mail.com'
];
return [{
json: {
...$json,
domain,
isBusiness: domain !== '' && !personalDomains.includes(domain)
}
}];
An IF node then routes on isBusiness. Personal emails (Gmail, Outlook, iCloud…) aren't trash — a small-business owner often writes from a personal address — but domain-based enrichment simply doesn't apply to them: they go straight to message scoring, while business emails additionally take the company enrichment branch. For a bare-bones case, a one-line expression ({{ $json.email.split('@')[1] }}) replaces the Code node, but the personal-domain list alone justifies writing those few lines of JavaScript.
Step 2 — Visit the company website and have an LLM read it
The domain gives you the website URL: an HTTP Request node doing a GET on https://{{ $json.domain }} fetches the homepage (use "Ignore SSL Issues" sparingly, and above all set a short timeout: a site that doesn't answer within ten seconds must not stall the pipeline). The raw HTML then goes into an LLM chain with a structured extraction prompt: main line of business, products or services, apparent size (team mentions, office locations, open positions), visible news, language and target markets.
Two building blocks make this step reliable. First, cleaning the HTML before calling the model — script and style tags stripped, text truncated to a few thousand characters — to keep token costs under control, a technique covered in our guide to web scraping with n8n and AI. Second, the Structured Output Parser, which forces the LLM to answer within a strict JSON schema (business, estimated_size, buying_signals, one_line_summary): without it, you get a free-form paragraph that's impossible to map onto CRM fields.
What the LLM brings here that no database provides: a read of the website as of today. A funding announcement, a well-stocked careers page, or a recent redesign are buying signals your sales rep will use in their first message — exactly what they used to dig up by hand.
Step 3 — Specialised databases and open company data
In parallel with the website visit (both branches fan out from the same node — that's the whole point of parallel execution), two families of structured sources round out the picture.
Commercial enrichment APIs. Services such as Dropcontact, Clearbit, or Hunter maintain B2B databases queryable by email or by domain: depending on the provider, they return the company record, verified contacts, the person's role, or the technologies detected on the website. In n8n, each is called through a plain HTTP Request node with the API key in a header — check their documentation for endpoints and terms, which change regularly. Their added value is verified, deduplicated data; their limit is coverage, which is stronger on some markets than others.
Open company registries. For French leads, the Recherche d'entreprises API (recherche-entreprises.api.gouv.fr), free and requiring no API key, queries the national SIRENE registry by company name and returns the SIREN (legal identifier), the NAF code (official sector), the headcount bracket, the founding date, and the head-office address — a single GET on /search?q=company-name. Most countries have an equivalent official registry worth wiring in. It's the most underused source in enrichment pipelines: authoritative, exhaustive for its market, and free. The legal identifier also becomes a reliable deduplication key in the CRM — two leads from the same group attach to the same company record.
Step 4 — Consolidate with a Merge, score, push to the CRM
The parallel branches (LLM website extraction, optional commercial API, official registry) converge on a Merge node in combine mode: each branch contributes its fields, and the output item holds the full profile. The subtleties of position, join keys, and conflicting fields are covered in our guide to combining data with the Merge node — the classic trap here being a branch that returns nothing (unreachable website, company missing from the registry), which must be configured so it doesn't block the join.
On this consolidated profile, the scoring from our qualification guide becomes far more discriminating: the rubric can now weigh the sector (official code inside your target market or not), the size (headcount bracket), and the buying signals detected on the website, on top of the message itself. Finally, a HubSpot or Pipedrive node writes the lead with every enriched field — legal ID, sector code, headcount, business summary, score and justification — following the practices from our HubSpot/Pipedrive CRM sync guide: look up the existing contact before creating one, and use the legal identifier as the matching field on the company side.
The GDPR doesn't forbid enrichment — it frames it
Enriching professional data in a B2B context classically rests on legitimate interest as the legal basis, defensible for targeted prospecting aimed at people contacted in their professional capacity. Three conditions to stay on the right side:
- Minimisation: only keep the fields that scoring and the sales team actually use. A pipeline that hoovers up everything the APIs return "just in case" directly contradicts this principle.
- Information: the person must be informed of the indirect collection at first contact at the latest — in practice, a line in the sales email plus an up-to-date privacy policy covers it.
- Lifecycle control: a defined retention period, and the ability to find and delete a person's data on request. If that side isn't tooled up yet, our guide to handling GDPR requests with n8n and the Compliance & Audit Pack ($149) cover automating access and erasure requests with an audit trail.
A simple guardrail inside the workflow: a final Set node that explicitly lists the fields you keep, rather than pushing the whole object to the CRM. Minimisation then becomes a property of the pipeline, not a good intention.
Why this has to happen in minutes, not hours
If enrichment were done by hand the next morning, it might as well not exist. The reference study on the subject, "The Short Life of Online Sales Leads" by Oldroyd, McElheran, and Elkington, published in the Harvard Business Review in 2011 (see it on Google Scholar), analysed large volumes of B2B leads and their response times: companies that contact a lead within an hour of submission are about seven times more likely to qualify it than those that wait even one hour more — and the gap becomes staggering past 24 hours. An online lead is a perishable good.
That is the central argument for this pipeline: automated enrichment doesn't just save ten minutes of research per lead, it makes an informed first contact possible inside the window where the lead is still hot. The sales rep gets the notification with the full profile and the score while the prospect is still at their screen — possibly still on your website.
Going further
This enrichment pipeline shares its skeleton — webhook, parallel calls, structured AI extraction, routing — with the inbound email triage workflows of the AI Inbox Pack ($79): if your acquisition runs through the mailbox as much as through the form, the same building blocks sort, summarise, and prioritise incoming requests before the CRM stage. And once the lead is enriched, scored, and pushed to the CRM, the next logical step is shortening the time to first contact even further by letting the lead book a slot directly — the subject of our guide to AI-powered appointment scheduling with n8n.
FAQ
Frequently asked questions
Do I need a paid enrichment API to get started?
No. A genuinely useful first pipeline needs no subscription at all: extract the domain from the email, visit the company website and extract key facts with an LLM, and query open company registries (in France, the free, keyless Recherche d'entreprises API returns the legal ID, official sector code, and headcount bracket). Commercial APIs such as Dropcontact, Clearbit, or Hunter come later, if you need data only they provide, like verified contacts or detected technologies.
What about leads who sign up with a personal email (Gmail, Outlook…)?
Don't discard them: a personal email doesn't mean a bad lead, only that domain-based enrichment doesn't apply. The right move is an IF node that routes these leads straight to the standard qualification pipeline (LLM scoring of the message), while business emails additionally go through the company enrichment branch.
Is B2B lead enrichment compatible with the GDPR?
Yes, provided you frame it properly: legitimate interest as the legal basis (defensible for B2B prospecting on professional data), data minimisation (only keep fields actually used by scoring and by sales), informing the person at first contact at the latest, and a defined retention period. Enriching sensitive data or building a profile disproportionate to the purpose would push the setup onto the wrong side of the line.
How long does the pipeline take to enrich a lead?
From a few seconds to about a minute, depending on how fast the visited website and the APIs respond. That's the whole point: research by Oldroyd and co-authors shows the odds of qualifying a lead drop sharply after the first hour. Enrichment triggered at submission time means sales gets a complete file within minutes, not the next day.
Bundle FlowKit Complet
€269