{
  "name": "New Lead Enrichment (Apollo -> HubSpot -> Slack)",
  "nodes": [
    {
      "parameters": {
        "content": "## Setup\n1. Paste your Apollo API key into the \"Enrich via Apollo\" node's header.\n2. Paste your HubSpot private app token into the \"Upsert HubSpot Contact\" node's header.\n3. Paste a Slack incoming webhook URL into the \"Notify Slack\" node.\n4. Activate the workflow, then POST {\"name\", \"email\", \"company_domain\"} to the Webhook URL for any new lead you want enriched.\n\nFrom Chapter 2: only enrich contacts you're about to message this week. Wire this to a form or a manual trigger for your weekly list, not a giant scraped list.",
        "height": 320,
        "width": 380
      },
      "id": "5b6c8f2a-1a11-4e2a-9c3a-000000000001",
      "name": "Setup Notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-200, 60]
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "new-lead-enrichment",
        "responseMode": "onReceived",
        "options": {}
      },
      "id": "5b6c8f2a-1a11-4e2a-9c3a-000000000002",
      "name": "New Lead Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [-200, 400]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apollo.io/v1/people/match",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Content-Type", "value": "application/json" },
            { "name": "X-Api-Key", "value": "YOUR_APOLLO_API_KEY" }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "name", "value": "={{ $json.name }}" },
            { "name": "email", "value": "={{ $json.email }}" },
            { "name": "domain", "value": "={{ $json.company_domain }}" }
          ]
        },
        "options": {}
      },
      "id": "5b6c8f2a-1a11-4e2a-9c3a-000000000003",
      "name": "Enrich via Apollo",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [40, 400]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            { "name": "email", "value": "={{ $json.person.email }}", "type": "string" },
            { "name": "first_name", "value": "={{ $json.person.first_name }}", "type": "string" },
            { "name": "last_name", "value": "={{ $json.person.last_name }}", "type": "string" },
            { "name": "title", "value": "={{ $json.person.title }}", "type": "string" },
            { "name": "company", "value": "={{ $json.person.organization?.name }}", "type": "string" }
          ]
        },
        "options": {}
      },
      "id": "5b6c8f2a-1a11-4e2a-9c3a-000000000004",
      "name": "Map Fields",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [280, 400]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.hubapi.com/crm/v3/objects/contacts",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            { "name": "Content-Type", "value": "application/json" },
            { "name": "Authorization", "value": "Bearer YOUR_HUBSPOT_PRIVATE_APP_TOKEN" }
          ]
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "properties.email", "value": "={{ $json.email }}" },
            { "name": "properties.firstname", "value": "={{ $json.first_name }}" },
            { "name": "properties.lastname", "value": "={{ $json.last_name }}" },
            { "name": "properties.jobtitle", "value": "={{ $json.title }}" },
            { "name": "properties.company", "value": "={{ $json.company }}" }
          ]
        },
        "options": {}
      },
      "id": "5b6c8f2a-1a11-4e2a-9c3a-000000000005",
      "name": "Upsert HubSpot Contact",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [520, 400]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "YOUR_SLACK_INCOMING_WEBHOOK_URL",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            { "name": "text", "value": "=New lead enriched and added to HubSpot: {{ $json.first_name }} {{ $json.last_name }} ({{ $json.company }}) - {{ $json.email }}" }
          ]
        },
        "options": {}
      },
      "id": "5b6c8f2a-1a11-4e2a-9c3a-000000000006",
      "name": "Notify Slack",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [760, 400]
    }
  ],
  "connections": {
    "New Lead Webhook": { "main": [[{ "node": "Enrich via Apollo", "type": "main", "index": 0 }]] },
    "Enrich via Apollo": { "main": [[{ "node": "Map Fields", "type": "main", "index": 0 }]] },
    "Map Fields": { "main": [[{ "node": "Upsert HubSpot Contact", "type": "main", "index": 0 }]] },
    "Upsert HubSpot Contact": { "main": [[{ "node": "Notify Slack", "type": "main", "index": 0 }]] }
  },
  "active": false,
  "settings": { "executionOrder": "v1" },
  "pinData": {}
}
