Free n8n template

Lead enrichment n8n template (HubSpot, data provider, AI website summary)

What it does

This n8n template fires when a HubSpot contact is created, skips free email domains and contacts already enriched, checks a 90-day domain cache, calls one company data provider, fetches the homepage and has Claude return what the company sells, who it sells to and a fit rating against your ideal customer profile. Enrichment fields always update, and primary fields are filled only when blank. You need HubSpot, a data provider API key, Google Sheets and an Anthropic API key.

What this workflow does

  1. HubSpot: contact created is n8n’s HubSpot Trigger subscribed to contact creation. Updates made by this workflow never fire it again, so there is no enrichment loop.
  2. HubSpot: get contact loads the email, company, website, country and the lumeor_enriched_at flag.
  3. Read domain cache loads past results from Google Sheets.
  4. Normalize and check cache lowercases the email, extracts the domain, skips about twenty common free and disposable providers, skips contacts already enriched, and reuses any successful cache entry younger than 90 days.
  5. Cached? sends cache hits straight to the HubSpot update and new domains to the lookup.
  6. Company data provider calls your provider’s company lookup by domain. Fetch homepage downloads the company’s homepage. Failures in either step continue with what is available.
  7. Build summary request maps the provider response (edit mapProvider for your provider), strips scripts, navigation and markup from the page, and caps it at 15,000 characters.
  8. Claude: summarize company returns what they sell, who they sell to, a fit rating of strong, possible, weak or unknown, and a one-line reason, at low effort.
  9. Merge rules always updates the enrichment fields with source and date, and copies company, website and country into the main fields only when they are blank.
  10. HubSpot: update contact writes the properties. Save to domain cache stores the result, and HubSpot errors go to Post enrichment issue in Slack.

Before you import

  • A current n8n version, reachable from the internet so HubSpot can call the trigger.
  • A HubSpot developer account and app for the trigger credential, and a private app token with contact read and write scopes for the API calls.
  • A company data provider with a lookup-by-domain endpoint and an API key sent in a header.
  • A Google Sheet with a “Domain cache” tab (domain, fetched_at, result_json).
  • An Anthropic API key and a Slack bot.

Setup

  1. Import the JSON file and connect the credentials. The two HubSpot HTTP nodes share the private app token credential.
  2. In HubSpot, create these contact properties: lumeor_enrich_summary, lumeor_enrich_fit, lumeor_enrich_fit_reason, lumeor_enrich_industry, lumeor_enrich_employees, lumeor_enrich_source and lumeor_enriched_at.
  3. In Company data provider, replace REPLACE_WITH_PROVIDER_COMPANY_LOOKUP_URL and create a Header Auth credential with your provider’s key.
  4. In Build summary request, replace REPLACE_WITH_ICP_DESCRIPTION with two or three specific sentences and adjust mapProvider.
  5. Replace REPLACE_WITH_SHEET_ID and REPLACE_WITH_SLACK_CHANNEL.

Test it

Activate the workflow and create three contacts: one at a real company domain, one with a Gmail address, and a second person at the first company. The first should get enrichment fields and a cache row. The Gmail contact should be skipped. The second contact at the same company should be filled from the cache, with “(cache)” in its source field and no provider call. Edit the company name on one contact by hand and confirm a later run never overwrites it.

Make it production-ready

  • Waterfall. Add a second provider after the first and call it only when key fields come back empty.
  • Cache store. Move the cache to Postgres once it holds thousands of domains, and log provider cost per lookup.
  • Rate limits. Provider and HubSpot APIs both throttle. Add batching before you backfill existing contacts.
  • More pages. Fetch an about or pricing page as well when homepages are thin.
  • Error workflow. Set one so a broken provider key is noticed quickly.
  • Model choice. claude-haiku-5-5 is a cheaper option for summarizing many websites.

Read the full guide, how to automate lead enrichment, pair it with the AI lead qualification agent template, or talk to Lumeor.

Next steps