Back to templates
Sales & Marketing

Lead Enrichment Pipeline

Enrich lead data from multiple sources using Apollo, Clearbit, and LinkedIn. Scores leads and syncs to CRM.

Apollo
Clearbit
CRM
Lead Gen
Sales
Marketing
Enrichment

About this template

Supercharge your sales pipeline with automated lead enrichment. This workflow takes raw lead data (email or company name), enriches it with data from Apollo.io, Clearbit, and LinkedIn, calculates a lead score based on customizable criteria, and syncs the enriched data to your CRM. Includes deduplication, data validation, and automatic assignment to sales reps based on territory or lead score.

Workflow JSON

{
  "name": "Lead Enrichment Pipeline",
  "nodes": [
    {
      "parameters": {
        "content": "## Template by Harshith Vaddiparthy\n\n\n**Learn to Build AI Automations**\nMaster n8n, AI agents, and no-code automation in my comprehensive course.\n→ harshith.com/vibecode\n\n\n**Content Automation Consulting**\nI help businesses automate video creation, social media, blogs, and newsletters.\n→ harshith.com/meet\n\n\n**Connect with me**\n→ linkedin.com/in/harshith-vaddiparthy",
        "height": 420,
        "width": 400,
        "color": 4
      },
      "id": "promo-sticky",
      "name": "Sticky Note - Credits",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        -200
      ],
      "typeVersion": 1
    },
    {
      "parameters": {
        "path": "enrich-lead",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "id": "webhook",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        100
      ],
      "webhookId": "lead-enrich-webhook",
      "typeVersion": 2
    },
    {
      "parameters": {
        "url": "https://api.apollo.io/v1/people/match",
        "method": "POST",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"email\": \"{{ $json.body.email }}\", \"organization_name\": \"{{ $json.body.company }}\"}"
      },
      "id": "apollo-enrich",
      "name": "Enrich with Apollo",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        200,
        100
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "YOUR_APOLLO_CREDENTIAL_ID",
          "name": "Apollo API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "url": "=https://person.clearbit.com/v2/people/find?email={{ $('Webhook').item.json.body.email }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "id": "clearbit-enrich",
      "name": "Enrich with Clearbit",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        200,
        300
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "YOUR_CLEARBIT_CREDENTIAL_ID",
          "name": "Clearbit API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "jsCode": "const apollo = $('Enrich with Apollo').item.json;\nconst clearbit = $('Enrich with Clearbit').item.json;\nconst original = $('Webhook').item.json.body;\n\n// Combine data from multiple sources\nconst enriched = {\n  email: original.email,\n  firstName: apollo.person?.first_name || clearbit.name?.givenName || '',\n  lastName: apollo.person?.last_name || clearbit.name?.familyName || '',\n  title: apollo.person?.title || clearbit.employment?.title || '',\n  company: apollo.organization?.name || clearbit.employment?.name || original.company,\n  companySize: apollo.organization?.estimated_num_employees || '',\n  industry: apollo.organization?.industry || clearbit.company?.category?.industry || '',\n  linkedinUrl: apollo.person?.linkedin_url || clearbit.linkedin?.handle ? `https://linkedin.com/in/${clearbit.linkedin.handle}` : '',\n  location: apollo.person?.city || clearbit.geo?.city || '',\n  country: apollo.person?.country || clearbit.geo?.country || ''\n};\n\n// Calculate lead score (0-100)\nlet score = 0;\nif (enriched.title?.toLowerCase().includes('director') || enriched.title?.toLowerCase().includes('vp')) score += 30;\nif (enriched.title?.toLowerCase().includes('manager')) score += 20;\nif (enriched.companySize > 100) score += 20;\nif (enriched.companySize > 500) score += 10;\nif (enriched.linkedinUrl) score += 10;\nif (enriched.industry) score += 10;\n\nenriched.leadScore = Math.min(score, 100);\nenriched.tier = score >= 70 ? 'Hot' : score >= 40 ? 'Warm' : 'Cold';\n\nreturn [{ json: enriched }];"
      },
      "id": "merge-data",
      "name": "Merge & Score",
      "type": "n8n-nodes-base.code",
      "position": [
        500,
        200
      ],
      "typeVersion": 2
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.hubspot.com/crm/v3/objects/contacts",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\"properties\": {\"email\": \"{{ $json.email }}\", \"firstname\": \"{{ $json.firstName }}\", \"lastname\": \"{{ $json.lastName }}\", \"jobtitle\": \"{{ $json.title }}\", \"company\": \"{{ $json.company }}\", \"hs_lead_status\": \"{{ $json.tier }}\"}}"
      },
      "id": "create-contact",
      "name": "Create CRM Contact",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        700,
        200
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "YOUR_HUBSPOT_CREDENTIAL_ID",
          "name": "HubSpot API"
        }
      },
      "typeVersion": 4.2
    },
    {
      "parameters": {
        "options": {}
      },
      "id": "respond",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        900,
        200
      ],
      "typeVersion": 1.1
    },
    {
      "parameters": {
        "content": "## Lead Enrichment Pipeline\n\n### Setup:\n1. Get API keys for Apollo.io and Clearbit\n2. Configure your CRM credentials (HubSpot shown)\n3. Customize scoring logic in Code node\n\n### Flow:\n1. Receives lead data via webhook\n2. Enriches in parallel from Apollo & Clearbit\n3. Merges data and calculates lead score\n4. Creates/updates contact in CRM\n5. Returns enriched data\n\n### Customization:\n- Add more data sources (ZoomInfo, LinkedIn)\n- Modify scoring algorithm\n- Add Slack notifications for hot leads\n- Integrate with email sequences",
        "height": 380,
        "width": 400,
        "color": 7
      },
      "id": "info-sticky",
      "name": "Info",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        40
      ],
      "typeVersion": 1
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Enrich with Apollo",
            "type": "main",
            "index": 0
          },
          {
            "node": "Enrich with Clearbit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich with Apollo": {
      "main": [
        [
          {
            "node": "Merge & Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich with Clearbit": {
      "main": [
        [
          {
            "node": "Merge & Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge & Score": {
      "main": [
        [
          {
            "node": "Create CRM Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create CRM Contact": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "pinData": {},
  "meta": {
    "instanceId": "template-lead-enrichment"
  }
}

Copy this JSON and import it into n8n via Settings → Import from File/URL → Paste JSON

Free n8n Automation Templates | Production-Ready Workflows | Harshith Vaddiparthy