# Lead Enrichment Workflow: HR Analytics SaaS
## 1. Workflow Overview
This workflow ingests leads from HubSpot forms and Typeform, enriches them with firmographic and persona data via Apollo and Clearbit, uses an LLM to summarize ICP fit and generate AE-ready talking points, scores them against your mid-market HR ICP, and routes hot leads to AEs in HubSpot — eliminating the manual LinkedIn/Crunchbase research step.
## 2. Tools & Integrations
- **Lead capture:** HubSpot Forms, Typeform
- **Orchestration:** n8n (self-hosted) or Make.com
- **Enrichment APIs:** Clearbit Enrichment (company), Apollo.io (person + intent), BuiltWith (tech stack)
- **AI layer:** OpenAI GPT-4o (or Claude Sonnet) via API
- **CRM:** HubSpot (Contacts + Companies + Deals)
- **Notifications:** Slack (#sales-hot-leads)
- **Dedup utility:** HubSpot Search API + n8n "Merge" node
## 3. Step-by-Step Workflow
1. **Trigger:** n8n webhook listens to HubSpot Form Submission and Typeform `form_response` events. Normalize payload into `{email, first_name, last_name, company, raw_title}`.
2. **Dedup check:** Call HubSpot Contacts Search API by email. If contact exists and `lifecyclestage = customer`, exit. Otherwise upsert.
3. **Person enrichment:** Apollo `people/match` by email → returns title, seniority, LinkedIn URL, department, location.
4. **Company enrichment:** Clearbit `/companies/find` by email domain → returns employee count, industry, HQ country, funding, domain. Fallback to Apollo Organizations if Clearbit returns 404.
5. **Tech stack lookup (optional):** BuiltWith domain query for HRIS signals (Workday, BambooHR, Rippling).
6. **AI enrichment:** Pass merged JSON to GPT-4o with the prompt below.
```
You are an SDR research analyst for an HR analytics SaaS sold to mid-market companies (200–2000 employees) in the US/Canada to HR or People Ops leaders.
Given this enriched lead JSON:
{{lead_json}}
Return STRICT JSON with these keys:
- icp_fit_score: integer 0-100
- icp_fit_reason: 1 sentence
- persona_match: "primary" | "secondary" | "none"
- company_summary: <=40 words on what they do
- pain_hypothesis: 1 sentence on the likely HR analytics pain given size, industry, and HRIS
- opening_line: 1 personalized sentence an AE can use in outreach
- disqualify_flag: true if employees<200, employees>2000, country not US/CA, or title unrelated to HR/People
Do not include any text outside the JSON.
```
7. **Scoring & routing:** Apply rules below in n8n Function node. If `tier = A`, round-robin assign to AE pool via HubSpot Owner API and post to Slack. Tier B → nurture sequence. Tier C/disqualified → marketing list.
8. **CRM sync:** Update HubSpot Contact + Company with all enriched fields, AI outputs, and `lead_tier`. Create a Task for assigned AE with `opening_line`.
## 4. Field Mapping Table
| Source field | HubSpot property | Object |
|---|---|---|
| apollo.title | `jobtitle` | Contact |
| apollo.seniority | `seniority_level` | Contact |
| apollo.linkedin_url | `linkedin_url` | Contact |
| clearbit.metrics.employees | `numberofemployees` | Company |
| clearbit.category.industry | `industry` | Company |
| clearbit.geo.country | `country` | Company |
| builtwith.hris | `current_hris` | Company |
| ai.icp_fit_score | `icp_fit_score` | Contact |
| ai.persona_match | `persona_match` | Contact |
| ai.company_summary | `company_summary_ai` | Company |
| ai.pain_hypothesis | `pain_hypothesis_ai` | Contact |
| ai.opening_line | `ai_opening_line` | Contact |
| computed | `lead_tier` | Contact |
## 5. Lead Scoring Logic
- **Disqualify** if `disqualify_flag=true` (size, geo, or title miss).
- **Tier A (hot):** icp_fit_score ≥ 80, employees 200–2000, US/CA, title contains HR/People/Talent/CHRO/CPO.
- **Tier B (warm):** icp_fit_score 60–79 OR adjacent title (Ops, Finance) at qualifying company.
- **Tier C (cold):** score < 60 but not disqualified → newsletter nurture.
- Bonus +10 if HRIS detected; +5 if recent funding within 12 months.
## 6. Error Handling & Deduplication Tips
- Wrap each API node in n8n `Try/Catch`; on 429, exponential backoff (1s→8s, 3 retries).
- If Clearbit and Apollo both miss, route to a "Manual Review" HubSpot list instead of failing silently.
- Validate AI output with JSON schema; on parse failure, retry once with `temperature=0`, then flag.
- Dedup by **lowercased email** AND **company domain + normalized full name** to catch personal-email submitters.
- Use HubSpot's `hs_object_id` as idempotency key in the workflow run log (Postgres or Airtable) to prevent double-enrichment on webhook retries.
- Log every enrichment cost per lead to monitor unit economics — target < $0.15/lead.
Automate Lead Enrichment Using AI and CRM Integrations
Tested prompts for ai workflow for lead enrichment compared across 5 leading AI models.
If you're searching for an AI workflow for lead enrichment, you're probably staring at a CRM full of half-complete records: names and emails, but no company size, industry, job title, or buying signals. Your SDRs are wasting hours copy-pasting from LinkedIn and Clearbit, and your outbound sequences are going out with generic messaging because the data isn't there to personalize.
The fix is a workflow that takes a raw lead (email, domain, or LinkedIn URL), pulls firmographic and technographic data from enrichment APIs, then uses an LLM to synthesize the messy output into clean CRM fields plus a tailored outreach angle. Done right, it runs on every new inbound form submission, list upload, or Zapier trigger, and writes structured data back to Salesforce, HubSpot, or Attio automatically.
Below you'll find the exact prompt we tested across four models, the raw outputs, and a comparison table. This editorial explains when to deploy this pattern, where it breaks, and how to plug it into your existing stack without creating a data-hygiene nightmare.
When to use this
This workflow fits teams with a steady inbound or outbound flow who need structured, CRM-ready enrichment at scale. It shines when you have a clear schema (fields you want filled) and access to source data (email, domain, or LinkedIn). The AI layer replaces manual research and normalizes messy API responses into consistent, writable values.
- Inbound demo requests that need instant routing and scoring before the SDR follow-up SLA
- Cold outbound list prep where you need industry, employee count, and tech stack appended to 5k+ rows
- Account-based marketing where each target account needs a custom one-line rationale for outreach
- CRM cleanup projects to backfill missing fields on existing contacts without hiring a data VA
- Event lead imports where badge-scan data is minimal and needs enrichment before sequencing
When this format breaks down
- Regulated industries (healthcare, finance) where enriched data must come from audited sources with a clear chain of custody, not LLM inference
- Tiny lead volumes (under 50/month) where manual enrichment by an SDR is faster and cheaper than building the pipeline
- When your source data is just a first name and generic gmail address, there's nothing reliable to enrich from
- Markets where your ICP is private individuals rather than B2B accounts, since most enrichment APIs are firmographic
The prompt we tested
You are an expert revenue operations engineer who designs AI-powered lead enrichment workflows that connect data sources, enrichment APIs, and CRM systems. Based on the user's context below, design a complete, production-ready lead enrichment workflow. Respond in Markdown with these sections in order: (1) Workflow Overview (2-3 sentences), (2) Tools & Integrations (bullet list naming specific tools like Clearbit, Apollo, Clay, HubSpot, Salesforce, Zapier, n8n, or Make), (3) Step-by-Step Workflow (numbered steps showing trigger → data lookup → AI enrichment → scoring → CRM sync, with the exact AI prompt used at the enrichment step in a code block), (4) Field Mapping Table (Markdown table mapping enriched fields to CRM properties), (5) Lead Scoring Logic (brief rules), and (6) Error Handling & Deduplication Tips. Keep the total response between 400 and 650 words and make every step concrete enough to implement today. User context: We're a B2B SaaS selling an HR analytics platform to mid-market companies in North America. New leads come in through HubSpot forms and a Typeform demo request, and we currently have a rep manually researching each one in LinkedIn and Crunchbase before routing. We want to automate enrichment, score fit against our ICP (200-2000 employees, HR or People Ops title, US/Canada), and auto-assign to AEs. Produce the workflow now.
Model comparison
| Model | Quality | Cost | Latency | Tokens |
|---|---|---|---|---|
| Claude Opus 4.7 | 9 | $0.1583 | 30.9s | 512 / 2008 |
| Claude Haiku 4.5 | 9 | $0.0072 | 15.5s | 353 / 1366 |
| GPT-5.4 | Not run yet | |||
| Gemini 2.5 Pro | 2 | $0.0006 | 19.4s | 311 / 49 |
| Grok 4.1 Fast Reasoning | 9 | $0.0006 | 16.7s | 451 / 1009 |
Outputs
# AI-Powered Lead Enrichment Workflow for HR Analytics SaaS
## Workflow Overview
This workflow automatically enriches leads from HubSpot forms and Typeform submissions using Apollo and Clearbit APIs, then applies AI-driven fit scoring against your ICP (mid-market, HR/People Ops buyers, North America). Qualified leads are auto-assigned to account executives with detailed enrichment context, eliminating manual research and reducing time-to-first-touch from days to minutes.
## Tools & Integrations
- **Lead Sources**: HubSpot Forms, Typeform
- **Enrichment APIs**: Apollo (company & person data), Clearbit (firmographic data)
- **Workflow Automation**: n8n (self-hosted) or Make (cloud)
- **AI Model**: OpenAI GPT-4 (fit assessment)
- **CRM**: HubSpot
- **Data Validation**: ZeroBounce (email verification, optional)
- **Deduplication**: HubSpot native + n8n duplicate detection
## Step-by-Step Workflow
1. **Trigger**: New lead submitted via HubSpot Form or Typeform webhook → n8n receives payload with name, email, company, and title.
2. **Email Verification**: Pass email through ZeroBounce API to confirm deliverability; stop workflow if invalid.
3. **Company Enrichment (Apollo)**: Query Apollo API with company domain extracted from email (e.g., `acme.com`). Retrieve: employee count, industry, founding year, funding stage, LinkedIn URL. If domain not found, use company name as fallback.
4. **Company Enrichment (Clearbit)**: Query Clearbit Enrichment API with company domain for additional data: revenue estimate, tech stack, employee LinkedIn URLs, location details.
5. **Person Enrichment (Apollo)**: Query Apollo with name + company to fetch person-level data: current title, years in role, LinkedIn profile, phone number, reporting structure.
6. **AI Fit Assessment**: Send enriched data to OpenAI with structured prompt (see below). Model returns: ICP fit score (0–100), fit reasoning, recommended routing, and risk flags.
```
You are a lead scoring expert for HR analytics software.
Enriched Lead Data:
- Name: {{name}}
- Title: {{title}}
- Company: {{company}}
- Employee Count: {{employee_count}}
- Industry: {{industry}}
- Location: {{company_location}}
- Revenue Estimate: {{revenue_estimate}}
ICP Criteria:
- Company Size: 200–2,000 employees
- Decision Maker Titles: Chief People Officer, VP People Operations, Head of HR, HR Director, People Operations Manager
- Location: US or Canada
- Industry Fit: Technology, Financial Services, Professional Services (exclude Healthcare, Manufacturing)
Task:
1. Score ICP fit (0–100) based on company size, title match, and geography.
2. Provide 1-line reasoning.
3. Identify any risk factors (e.g., title mismatch, company size outside range).
4. Recommend AE routing: "Enterprise" or "Mid-Market" segment.
Return JSON only:
{
"fit_score": <number>,
"reasoning": "<string>",
"segment": "<string>",
"risks": [<strings>]
}
```
7. **Scoring Rules**: Leads scoring ≥70 proceed to auto-assignment; 50–69 marked "Manual Review"; <50 marked "Low Priority."
8. **Data Mapping & CRM Sync**: Map enriched fields to HubSpot contact and company properties (see table below).
9. **Auto-Assignment**: Use HubSpot workflows to assign leads scoring ≥70 to AEs based on segment (round-robin or territory rules).
10. **Logging**: Store enrichment payload and AI response in HubSpot deal notes for audit trail.
## Field Mapping Table
| Enriched Data Source | HubSpot Contact Property | HubSpot Company Property |
|---|---|---|
| Apollo/Clearbit: name | First Name + Last Name | — |
| Apollo: title | Job Title | — |
| Apollo: company | — | Company Name |
| Clearbit: employee_count | — | Annual Revenue (proxy) |
| Apollo: employee_count | — | Number of Employees |
| Clearbit: industry | — | Industry |
| Clearbit: location | — | Company City + Country |
| Apollo: linkedin_url | LinkedIn Profile URL | — |
| OpenAI: fit_score | ICP Fit Score | — |
| OpenAI: segment | Sales Segment | — |
| ZeroBounce: valid | Email Validation Status | — |
## Lead Scoring Logic
- **≥70**: Auto-assign to AE; mark "Sales Ready"
- **50–69**: Tag "Manual Review"; notify sales manager
- **<50**: Tag "Low Priority"; add to nurture sequence
- **Bonus points** (+10): Inbound demo request (Typeform); funded company
- **Penalty** (−15): Title mismatch (e.g., "Finance"); company <200 or >2,000 employees
## Error Handling & Deduplication Tips
- **API Failures**: If Apollo/Clearbit timeout, retry up to 2×; if still failing, create contact with available data and flag for manual review.
- **Deduplication**: Check HubSpot for existing contact by email before enrichment; if found, update existing record and log in notes.
- **Bad Data**: Reject leads with invalid emails, missing company, or title=null; log to error sheet for QA review.
- **Rate Limiting**: Stagger API calls using n8n delays (200ms between requests) to respect vendor rate limits.
Of course. Here is a complete, production-ready lead enrichment workflow designed for your B2B SaaS company. ### Workflow Overview This workflow automates the enrichment and qualification of inbound leads from HubSpot and Typeform. It uses an orchestration
# AI-Powered Lead Enrichment Workflow for HR Analytics SaaS
## 1. Workflow Overview
This workflow automates lead enrichment for new submissions from HubSpot forms and Typeform demo requests, pulling company and persona data from Apollo.io, applying AI-driven insights and ICP scoring, and syncing qualified leads to HubSpot for AE assignment. It replaces manual LinkedIn/Crunchbase research, focusing on mid-market fit (200-2000 employees, HR/People Ops titles, US/Canada). Leads score 70+ auto-assign to AEs, ensuring reps focus on high-fit opportunities.
## 2. Tools & Integrations
- **HubSpot** (CRM for triggers, updates, and AE assignment)
- **Typeform** (demo request forms; webhooks sync to HubSpot via native integration)
- **n8n** (open-source workflow automation orchestrating all steps)
- **Apollo.io** (enrichment API for company size, location, job titles)
- **OpenAI GPT-4o** (AI enrichment, persona insights, and scoring)
## 3. Step-by-Step Workflow
1. **Trigger**: Use n8n's HubSpot "New Form Submission" or "Contact Created" node (filter for lifecycle stage "Lead" or form source "Typeform Demo"). Pulls email, name, company domain from HubSpot object.
2. **Data Lookup**: Apollo.io "Enrich Contact" node (API key auth; input email/domain). Retrieves: employee_count, company_location (HQ country), current_title, industry. Outputs JSON with fields like `employee_range`, `title`, `country`.
3. **AI Enrichment**: OpenAI node processes Apollo data + raw lead info. Generates persona summary, buying signals, and custom notes.
```plaintext
You are an expert ICP evaluator for a B2B HR analytics SaaS targeting mid-market (200-2000 employees) in US/Canada with HR/People Ops leaders.
Lead data: Email={{ $json.email }}, Company={{ $json.company }}, Apollo: employee_count={{ $json.employee_count }}, title={{ $json.current_title }}, location={{ $json.company_location }}.
Output JSON only:
{
"persona_summary": "1-2 sentence profile + pain points (e.g., 'HR Director at scaling firm struggling with analytics')",
"buying_signals": ["signal1", "signal2"] (e.g., recent funding from Crunchbase if available),
"enrichment_notes": "Key insights for rep (e.g., 'Similar to past customer X')"
}
```
4. **Scoring**: OpenAI node (chained) or n8n Function node computes 0-100 score from AI output + rules (detailed in section 5). Adds `lead_score` and `assignment_recommendation` (e.g., "AE1" based on territory).
5. **CRM Sync**: HubSpot "Update Contact" node (match by email; set lifecycle to "Qualified"; assign owner if score >=70). Creates deal if score >=90. n8n schedules daily for backfills.
## 4. Field Mapping Table
| Enriched Field | HubSpot Property |
|-------------------------|---------------------------|
| Apollo employee_count | Company size |
| Apollo current_title | Job title |
| Apollo company_location| Company country |
| AI persona_summary | Lead notes |
| AI buying_signals | Custom field: Signals |
| AI enrichment_notes | Additional notes |
| lead_score | Lead status (numeric) |
| assignment_recommendation | HubSpot owner (lookup ID)|
## 5. Lead Scoring Logic
- Base: +20 if US/Canada HQ; +30 if 200-2000 employees; +30 if title matches "HR|People Ops|Talent|Head of People" (regex).
- Boosters: +10 per buying signal (AI-detected); +10 industry=HR Tech/SaaS.
- Thresholds: <50=Disqualified (set lifecycle "Evangelism"); 50-69=Nurture; 70+=MQL (assign AE); 90+=SQL (create deal). Final score caps at 100.
## 6. Error Handling & Deduplication Tips
- **Deduplication**: n8n HubSpot "Get Contact by Email" node pre-enrichment; skip if exists (update only if score changed >20%).
- **Errors**: Apollo/OpenAI timeouts → n8n Retry node (3x, 5min backoff); log to Slack via webhook; fallback to raw data sync. Rate limits: Throttle to 10/min via n8n Delay.
- **Monitoring**: n8n executions dashboard + HubSpot activity logs; test with 5 sample leads today via n8n's manual trigger.
*(Word count: 528)*
What makes these work
-
01Lock the output schema
Define the exact CRM fields and value formats (e.g., employee_count as integer, industry from a fixed taxonomy) in the prompt. This lets you write directly to Salesforce or HubSpot without a post-processing step and prevents the model from inventing new field names.
-
02Chain enrichment APIs before the LLM
Don't ask the LLM to guess firmographics from thin air. Call Clearbit, Apollo, or People Data Labs first, feed the raw JSON into the prompt, and let the model's job be synthesis and inference, not fabrication. Quality jumps dramatically.
-
03Separate facts from angles
Split the output into two blocks: verifiable data (revenue, headcount, stack) and inferred commentary (outreach angle, ICP fit rationale). Reps trust the first block as source of truth and treat the second as a starting point, not gospel.
-
04Set a confidence threshold
Have the model return a confidence score per field. Anything below 0.7 goes to a human review queue instead of auto-writing to the CRM. This one rule prevents most of the bad-data disasters that kill enrichment projects in month two.
More example scenarios
New HubSpot form submission: Jane Liu, jane@northwindlogistics.com, filled out 'Request a Demo' on pricing page. No other fields. Enrich and score for our ICP: mid-market logistics companies, 200-2000 employees, North America.
Company: Northwind Logistics, Inc. Industry: Third-party logistics. HQ: Chicago, IL. Employees: 850. Revenue: ~$180M. Tech stack: SAP, Descartes. Jane Liu: VP Operations, 6 yrs tenure. ICP fit: Strong (A). Routing: Enterprise AE. Outreach angle: Reference their recent Chicago DC expansion announced in March.
CSV row: domain=acmepaints.io, contact_email=p.hernandez@acmepaints.io. Append: company description, employee band, primary industry, funding stage, one personalization hook from recent news or website.
Acme Paints: DTC eco-friendly interior paint brand founded 2019. Employees: 11-50. Industry: Consumer goods / Home improvement. Funding: Series A, $8M (Collab Fund, 2023). Hook: Just launched a refillable paint program in Q2, a strong angle for sustainability-focused messaging.
Target account: Stripe. Need a one-paragraph briefing for our AE covering current priorities, recent leadership hires in finance, and any signals they're evaluating AP automation tools. Our product is a mid-market AP automation platform.
Stripe is deep into its enterprise push post-2024, with new CFO Steffan Tomlinson (ex-Confluent) hired Jan 2024 emphasizing operational efficiency. Recent job postings include 'Senior Manager, Accounts Payable Operations' and 'Procurement Systems Lead'. Signal: RFP activity on G2 for Coupa and Tipalti in Q1. Angle: Position against incumbents on speed of deployment.
Badge scan: Tom Becker, Director of IT, company field blank, email tom.b@mercyhealthsystems.org. We sell identity management to hospitals >500 beds.
Company: Mercy Health Systems (Cincinnati-based, Catholic non-profit). Beds: ~2,300 across 23 hospitals. Annual revenue: $7B+. Tom Becker: Director of IT Infrastructure, Mercy, 4 yrs. ICP fit: Strong. Known tech: Epic, Imprivata. Next step: Route to Healthcare AE, reference Imprivata contract renewal cycle (typically Q4).
Salesforce contact missing: industry, employee_count, seniority_level. Known: email=mira@paloverde.dev, title='Staff Engineer', created 2022.
Palo Verde (paloverde.dev): Developer tools startup, API observability. Industry: SaaS / DevTools. Employee count: 25. Seniority level: Individual contributor (Staff, senior IC track). Note: Too small for our mid-market ICP; recommend demoting to nurture segment rather than active pipeline.
Common mistakes to avoid
-
Letting the LLM hallucinate firmographics
Asking 'what is the employee count of Acme Corp' with no API data in context produces confident-sounding nonsense. Always ground the model in retrieved data from a real enrichment source before asking it to synthesize.
-
Overwriting existing CRM data
Bulk enrichment jobs that blindly update every field will clobber manually curated data your team spent months building. Always write to 'enriched_*' shadow fields first, or only update fields where the current value is null.
-
Ignoring GDPR and CCPA
Enriching EU contacts with personal data from third-party brokers without a lawful basis is a fast track to a complaint. Gate enrichment by region and document the legitimate interest assessment before you turn the pipeline on.
-
No feedback loop from reps
If AEs can't flag bad enrichment ('wrong company', 'stale title'), the model's errors compound. Add a one-click 'bad enrichment' button in the CRM and pipe flags back into your prompt eval set weekly.
-
Running enrichment on every field change
Triggering a full enrichment call on any contact update burns API credits and introduces duplicate work. Fire enrichment only on creation or on an explicit 'enrich now' action, and cache results for 90 days minimum.
Related queries
Frequently asked questions
What's the cheapest way to run AI lead enrichment at scale?
Use a two-tier model: a cheap enrichment API (Apollo or PDL at ~$0.05/record) for firmographics, then GPT-4o-mini or Claude Haiku for synthesis at ~$0.001/record. Reserve premium models for your top-tier ABM accounts where the output is worth the extra cost.
Can I build this with just Zapier or do I need code?
Zapier, Make, and n8n can all handle the basic flow: trigger on new CRM record, call enrichment API, call OpenAI, update CRM. You'll hit limits around volume (>1k/day), retry logic, and confidence-based routing, at which point a lightweight backend on Render or a Temporal workflow is worth it.
Which CRM integrates best with AI enrichment workflows?
HubSpot has the cleanest webhooks and custom property API for this pattern. Salesforce works but requires more setup around Apex triggers or Flow. Attio and Close are newer options with API-first designs that make AI enrichment straightforward from day one.
How accurate is AI-inferred data versus a paid enrichment provider?
For firmographics (industry, size, HQ), paid providers like ZoomInfo and Apollo beat pure LLM inference by a wide margin. Where AI wins is synthesis: turning raw API data plus recent news into a one-line outreach angle or ICP rationale. Use both, not one.
Do I need to worry about LLMs leaking lead data?
If you're using OpenAI or Anthropic APIs, data is not used for training by default on business tiers, but you should still avoid sending full PII where unnecessary. For regulated industries, use Azure OpenAI, AWS Bedrock, or a self-hosted model with a signed DPA.
How do I measure if the enrichment workflow is actually working?
Track three metrics: field fill rate (what % of target fields get populated), accuracy (manual audit of 50 random records monthly), and downstream impact (reply rate on enriched vs non-enriched outbound). If reply rate doesn't move, the enrichment isn't changing rep behavior and needs rework.