Automate B2B Lead Enrichment with n8n, Clearbit & Cognism

Enrichment is the point where a lead form submission becomes something a sales rep can actually act on. Left manual, that gap gets filled with guesswork: a rep checking LinkedIn between calls, a stale CSV upload from last quarter, a routing rule that silently misfires because a firmographic field was never filled in. This post covers how to build a working enrichment pipeline in n8n that pulls company data from Clearbit and verified contact data from Cognism, merges the two without one silently overwriting the other, and writes the result into HubSpot or Pipedrive in a way that survives contact with real production data.

Why B2B Lead Enrichment Breaks Down Without Automation

A web form only captures what the visitor typed. If someone enters a personal Gmail address or types their company name in three different formats across three different forms, the CRM ends up with a record that is technically complete and practically useless for routing or scoring. Sales reps compensate by opening a new tab for every lead, searching LinkedIn and the company website, and typing what they find into free-text fields. That works for a handful of leads a day. It falls apart the moment volume increases, because the manual research step does not scale linearly with headcount the way a rep’s calendar does.

Spreadsheet-based enrichment has a different failure mode: it goes stale. Headcount, funding stage and technology stack change continuously, but a CSV exported once a quarter is already out of date by the time a rep opens it. Worse, lead routing rules that key off firmographic fields (employee count bands, industry codes, region) misfire silently when those fields are blank. An enterprise lead can land in the SMB queue not because the rule is wrong, but because nobody populated the field the rule depends on.

Automated enrichment removes the guesswork by resolving company and contact detail from a verified third-party source at the moment a lead enters the pipeline. The lead’s own typing no longer decides what ends up in the CRM record.

What Clearbit and Cognism Each Add to the Record

Clearbit resolves company-level detail from an email domain: employee count, industry classification, estimated revenue band, and detected technology stack (built by scanning a company’s public web presence for known tools and scripts). That technology-stack field is one of the more useful inputs for lead scoring, because it tells you what a prospect already runs before a rep ever asks a discovery question. It also has more gaps for smaller or privacy-conscious companies whose sites block scanning tools, so treat a null technology field as “unknown” rather than “not using anything”.

Cognism is built around verified, consent-checked contact data: direct dials, mobile numbers and role information tied to a named individual rather than a generic company inbox. Its strength is contact accuracy, particularly for phone numbers, which Clearbit’s own contact data is comparatively thin on. The practical implication for workflow design is that the two providers solve different problems: Clearbit is strongest on the firmographic shape of the account, Cognism is strongest on how to actually reach the person inside it.

That difference in strength is also why sequencing matters, which is covered in the workflow section below.

Core Components You Need Before Building Anything

Four things need to be in place before the first node goes down: a running n8n instance, a Clearbit API key with both company and person enrichment scopes enabled, a Cognism API key, and CRM credentials (a HubSpot private app token or a Pipedrive API token, depending on which system holds the record of truth). Store all of these in n8n’s built-in credential manager, not pasted directly into HTTP Request nodes; that way a key rotation is a one-line change instead of an edit to every node that references it.

Both providers charge per successful match, so before committing to full-volume enrichment it pays to run a small batch of your own real leads through each API and check match rates by segment. A provider that returns strong results for enterprise software companies may return far weaker results for a niche vertical your business actually sells into, and that difference only shows up by testing against your own lead mix rather than a vendor’s published averages.

Choosing Between n8n Cloud and Self-Hosted

n8n Cloud is the simpler default when data residency is not a constraint: hosting, updates and uptime are handled for you, and you can be enriching leads within an afternoon. See the n8n documentation for setup detail on both deployment models. Self-hosting becomes the right call when compliance requires enrichment traffic to stay behind your own firewall, or when you want direct control over how long raw API payloads are retained before they are merged and the raw response discarded. The tradeoff is maintenance: someone on your team now owns upgrades, backups and uptime for a system that touches production CRM data.

Building the n8n Workflow Step by Step

The workflow itself has four functional stages: a trigger that brings a lead in, two enrichment branches that run in a specific order, a merge step that reconciles their output, and a write step that lands the result in the CRM. Each stage has a decision embedded in it that is easy to get wrong on a first build.

Input and Trigger Nodes

A Webhook node handles real-time enrichment of new form submissions, so a rep sees a fully enriched record before they ever pick up the phone. A CSV or Google Sheets node handles batch enrichment of an existing list, which is the better choice when the goal is a one-off cleanup rather than an ongoing pipeline. Running both is common: webhook enrichment for everything going forward, a batch run to backfill records that predate the automation.

Enrichment Sequencing: Clearbit First, Cognism Second

Run Clearbit before Cognism, not the other way round. Clearbit resolves and confirms the company domain from the lead’s email address, and that confirmed domain is a far more reliable search input for Cognism’s contact lookup than the raw personal email address the lead originally submitted. Feeding Cognism a verified domain instead of a guessed one measurably improves contact match rates, because Cognism’s contact database is organised primarily around confirmed company records rather than free-text email search. Where a native node does not expose a field you need, an HTTP Request node against the provider’s REST API fills the gap, with the same rate-limit handling described later in this post.

Merging and Reconciling Conflicting Fields

A Merge node combines the two branches into a single item once both have run. The interesting work happens in the Set or Function node immediately after it, which has to decide what happens when both providers return a value for the same field. A simple and defensible rule: Clearbit wins on firmographic fields (industry, headcount, technology stack) and Cognism wins on phone and mobile numbers, because that split matches each provider’s core strength. Treating both sources as equally authoritative on every field ignores where each one is actually reliable. Where Cognism exposes a last-verified date, an IF node can additionally prefer the more recently verified value over an older one, and where either provider returns a null for a given field, the other provider’s value should pass through untouched, not overwritten with a blank.

How the merge node resolves conflicting data from Clearbit and Cognism before writing to the CRMLead TriggerWebhook or CSV fileClearbitCompany enrichmentCognismContact enrichmentMerge NodeCombines both outputsOnly One MatchUse that result directlyBoth MatchedProvider strength decidesWrite to CRMSaved to HubSpot or Pipedrive
The merge decision that determines which provider’s value wins before a record reaches the CRM.

Handling Failures, Rate Limits and Partial Matches

At any real volume you will hit rate limits. A 429 response from either provider should trigger a Wait node with exponential backoff (a short delay that increases on each retry). An immediate retry just repeats the same rejection. Build a dedicated error-handling workflow that catches failed executions and routes them to a review queue, whether that is a Slack alert, a separate CRM list, or a simple logging sheet, so a failed lookup produces a visible flag; the alternative is a lead that quietly never gets enriched.

Partial matches need their own guard rail. If Clearbit or Cognism returns a null for a field, that null should never overwrite a value already sitting in the CRM, particularly one a rep entered by hand after a call. An IF node checking “does the incoming value exist” before any write prevents a null API response from erasing good manually-entered data, which is one of the fastest ways to lose trust in an automation once a sales team notices it happening.

Writing Enriched Data Back to the CRM Without Breaking It

Map enriched values into dedicated custom properties such as “enrichment source” and “last enriched date”. Don’t overwrite existing fields directly with them. That gives you an audit trail: you can see at a glance which records were touched by automation, when, and by which provider, and you can re-run a stale record on a schedule without guessing whether it has already been enriched.

In HubSpot, update only the properties your workflow owns through the CRM API. Avoid a blanket update to the whole contact record, so you don’t collide with other automations writing to the same object; the HubSpot developer documentation covers the properties endpoints in detail. In Pipedrive, enriched data flows into linked Person and Organization records, and a common source of duplicate Organization records is inconsistent domain formatting: “acme.com”, “https://acme.com” and “acme.com/” will all create separate organisations unless the domain is normalised (lowercased, protocol and trailing slash stripped) in a Set node before it’s used as a search key.

Staying GDPR Compliant When You Enrich Contact Data

Appended contact data is still personal data about an identifiable individual, so it carries the same obligations as data collected directly from a form. Most B2B teams rely on legitimate interests as the lawful basis for enriching business contact detail, but that requires a documented balancing test, not an assumption that B2B contact data is automatically exempt. The ICO’s guidance for organisations is the reference point for how that basis is expected to be documented and reviewed.

Two practical habits keep the workflow defensible: pull only the fields the workflow actually uses, not a provider’s entire response object, and record the source and enrichment date on every record. That way, an objection or erasure request can be traced back to where the data came from and removed cleanly, instead of hunted for across multiple systems.

Testing and Monitoring the Workflow Before You Trust It

Run the workflow against a small batch of real leads first and manually cross-check the enriched output against a handful of records you already know to be accurate. n8n’s Execution History lets you confirm nodes are chaining correctly and that error handling actually fires under a forced failure, both of which are easier to catch on ten test records than on the first day of production volume.

Once live, track match rate by industry or company size segment over time. A single aggregate number hides where the real problems sit. A rising null rate concentrated in one segment, such as healthcare or public sector organisations that commonly block scanning tools, points to a data-availability issue in that segment rather than a bug in the workflow, and the fix is a fallback path or manual review queue for that segment rather than a change to the automation itself. A short weekly checklist covers most of what matters: confirm required fields are populated before any CRM write, confirm every enriched record carries source attribution, confirm records pending consent review are excluded from outbound use, and rerun a small sample to check the match rate hasn’t quietly drifted.

Common Failure Modes and How to Fix Them

Four patterns account for most of the problems teams hit after their first few weeks running this pipeline.

Null-heavy segments. Certain industries return a high proportion of nulls because their sites block the scanning techniques Clearbit relies on for technology-stack detection. Route those records to a secondary enrichment pass or a short manual review step instead of leaving the field permanently blank.

Silent partial success. A workflow can complete without error even when only one enrichment branch actually returned data, because a merge with one empty branch is not itself an error condition. Add a check after the merge that flags any record where both providers returned zero matched fields, and route those to a review queue. Left unflagged, they pass through as if fully enriched.

Duplicate records from domain formatting. Inconsistent casing or trailing characters in a domain string create duplicate Organization or Company records during CRM lookups. Normalise the domain in a Set node before it’s used as a search key, not after.

Credential expiry breaking the whole workflow. An expired or rotated API key stops every downstream node at once if keys are hard-coded into individual HTTP Request nodes. Store credentials centrally in n8n’s credential manager so a rotation is a single update rather than a hunt through every node that references the old key.

Should Clearbit or Cognism run first in an n8n enrichment workflow?

Run Clearbit first so it confirms the company domain from the lead’s email address, then pass that confirmed domain into Cognism’s contact search. Searching Cognism on a raw personal email address instead of a confirmed company domain tends to produce a lower contact match rate.

What happens when Clearbit and Cognism return different values for the same field?

A Set or Function node after the Merge node applies a fixed rule: Clearbit wins on firmographic fields such as industry, headcount and technology stack, and Cognism wins on phone and mobile numbers, matching each provider’s core strength. Where Cognism exposes a last-verified date, that date breaks the tie instead.

Is enriching contact data with Clearbit and Cognism compliant with UK GDPR?

Most B2B teams rely on legitimate interests as the lawful basis, but this requires a documented balancing test, a recorded source and enrichment date on each record, and a process for handling objection or erasure requests, since appended data about an identifiable person is still personal data under UK GDPR.

How do I stop one failed API call from blocking the whole enrichment batch?

Add a Wait node with exponential backoff for rate-limit responses, and route persistent failures to a separate error-handling workflow rather than letting one failed record halt the execution or silently drop data.

Should I run n8n Cloud or self-hosted for this workflow?

n8n Cloud is the simpler default when data residency isn’t a constraint, since hosting and updates are managed for you. Self-hosting suits teams whose compliance requirements mean enrichment traffic must stay behind their own firewall, or who need direct control over how long raw API responses are retained before merging.

Automate B2B Lead Enrichment with n8n, Clearbit & CognismB2B Lead EnrichmentWhat gets automatedn8nTool in the chainClearbitTool in the chainCRM UpdatedResult lands where reps look
How B2B Lead Enrichment moves through n8n and Clearbit.

For more on this, see more on lead generation and outreach, including Automating SaaS Lead Scoring with n8n Workflows & AI Models, Managing 1500+ Daily Leads With CRM and Automation for B2C Growth, and RevOps-Driven SaaS Lead Generation: Strategies, Channels & Conversions.

Book your free AI audit


Leave a Reply