{
  "name": "Sales Engagement Enrichment with Lusha",
  "nodes": [
    {
      "id": "84d72939-4764-45c0-80b4-7adb0b5d3288",
      "name": "\ud83d\udccb Sales Engagement Enrichment",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -100,
        -560
      ],
      "parameters": {
        "width": 900,
        "height": 540,
        "content": "## Enrich Contacts Added to Sales Sequences with Lusha\n\n**Who it's for:** SDRs & AEs running outbound campaigns\n\n**What it does:** When a contact is added to a HubSpot sequence, Lusha enriches them with verified email, direct phone, and seniority. Valid contacts are pushed to your outreach tool; invalid ones are logged. CRM records are updated with enriched data and an SDR alert is sent for high-value prospects.\n\n### How it works\n1. HubSpot trigger fires when a contact property changes (sequence enrollment)\n2. Lusha enriches the contact with verified email and direct phone\n3. A code node builds the outreach-ready prospect record\n4. Valid contacts are pushed to Outreach/Salesloft + CRM is updated\n5. Invalid contacts are logged and an SDR is alerted on Slack\n\n### Setup\n1. Install the [Lusha community node](https://www.npmjs.com/package/@lusha-org/n8n-nodes-lusha)\n2. Add your Lusha API, HubSpot OAuth2, and Slack credentials\n3. Configure the HubSpot trigger property and Outreach API endpoint\n4. Set the Slack channel for skip notifications"
      },
      "typeVersion": 1
    },
    {
      "id": "3cb3c726-d319-495b-831e-64d7e1939e0e",
      "name": "\ud83d\udd14 1. CRM Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -30,
        50
      ],
      "parameters": {
        "color": 7,
        "width": 400,
        "height": 270,
        "content": "Fires when a HubSpot contact's sequence enrollment count changes \u2014 indicating they were added to a sales sequence.\n\n**Nodes:** HubSpot Property Change Trigger\n\n\ud83d\udca1 Customize the property name to match your CRM setup."
      },
      "typeVersion": 1
    },
    {
      "id": "0a822b5e-6f4b-4f5d-9bd1-fec0aaa1b7bf",
      "name": "\ud83d\udd0d 2. Enrich & Build Prospect",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        420,
        50
      ],
      "parameters": {
        "color": 7,
        "width": 550,
        "height": 270,
        "content": "Lusha enriches the contact by email. A code node validates the enrichment and builds a clean prospect record for outreach.\n\n**Nodes:** Lusha Enrich \u2192 Build Prospect Record \u2192 Has Valid Email? (IF)\n\n\ud83d\udcd6 [Lusha API docs](https://www.lusha.com/docs/)"
      },
      "typeVersion": 1
    },
    {
      "id": "4cb93922-b70c-497e-99e2-0d830538bf6a",
      "name": "\ud83d\udce4 3. Route, Update & Notify",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        50
      ],
      "parameters": {
        "color": 7,
        "width": 700,
        "height": 270,
        "content": "Valid prospects are pushed to Outreach and their CRM records are updated. Invalid contacts are logged and the SDR is notified on Slack.\n\n**Nodes:** Outreach HTTP + Update HubSpot / Log Skipped + Slack Alert\n\n\ud83d\udca1 Replace the Outreach API call with Salesloft or your engagement tool."
      },
      "typeVersion": 1
    },
    {
      "id": "f9fb0b4a-ef93-4633-af33-b9b1d2a4a4a7",
      "name": "Contact Added to Sequence",
      "type": "n8n-nodes-base.hubspotTrigger",
      "position": [
        0,
        400
      ],
      "parameters": {
        "eventsUi": {
          "eventValues": [
            {
              "name": "contact.propertyChange"
            }
          ]
        },
        "property": "hs_sequences_actively_enrolled_count"
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e73fc28d-7483-4059-a8a2-e33f91856986",
      "name": "Enrich with Lusha",
      "type": "@lusha-org/n8n-nodes-lusha.lusha",
      "position": [
        350,
        400
      ],
      "parameters": {
        "email": "={{ $json.properties.email }}",
        "searchBy": "email",
        "operation": "enrichSingle",
        "contactEnrichAdditionalOptions": {}
      },
      "credentials": {
        "lushaApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2e154507-ba48-4cf3-94d1-543ff707690f",
      "name": "Build Prospect Record",
      "type": "n8n-nodes-base.code",
      "position": [
        650,
        400
      ],
      "parameters": {
        "jsCode": "// Build clean prospect record from Lusha enrichment\nconst crm = $('Contact Added to Sequence').first().json;\nconst lusha = $json;\n\nreturn { json: {\n  contactId: crm.objectId,\n  email: crm.properties?.email,\n  firstName: lusha.firstName || crm.properties?.firstname || '',\n  lastName: lusha.lastName || crm.properties?.lastname || '',\n  verifiedEmail: lusha.primaryEmail || '',\n  phone: lusha.primaryPhone || '',\n  jobTitle: lusha.jobTitle || '',\n  seniority: lusha.seniority || '',\n  company: lusha.companyName || crm.properties?.company || '',\n  companyDomain: lusha.companyDomain || '',\n  industry: lusha.companyMainIndustry || '',\n  companySize: Array.isArray(lusha.companySize) ? lusha.companySize[1] : '',\n  linkedinUrl: lusha.linkedinProfile || '',\n  hasValidEmail: !!lusha.primaryEmail,\n  enrichedAt: new Date().toISOString()\n} };"
      },
      "typeVersion": 2
    },
    {
      "id": "c15dfa88-113a-4100-a767-a964b0d8fcf1",
      "name": "Has Valid Email?",
      "type": "n8n-nodes-base.if",
      "position": [
        950,
        400
      ],
      "parameters": {
        "conditions": {
          "combinator": "and",
          "conditions": [
            {
              "id": "3fc2573b-4a59-43d2-906b-130ce34080ac",
              "operator": {
                "type": "boolean",
                "operation": "true"
              },
              "leftValue": "={{ $json.hasValidEmail }}",
              "rightValue": true
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3327f15d-31c7-4218-82c4-dfd9aa433f60",
      "name": "Add to Outreach Sequence",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1250,
        280
      ],
      "parameters": {
        "url": "https://api.outreach.io/api/v2/prospects",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"data\": {\n    \"type\": \"prospect\",\n    \"attributes\": {\n      \"firstName\": \"{{ $json.firstName }}\",\n      \"lastName\": \"{{ $json.lastName }}\",\n      \"emails\": [\"{{ $json.verifiedEmail }}\"],\n      \"homePhones\": [\"{{ $json.phone }}\"],\n      \"title\": \"{{ $json.jobTitle }}\",\n      \"company\": \"{{ $json.company }}\"\n    }\n  }\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/vnd.api+json"
            }
          ]
        }
      },
      "typeVersion": 4
    },
    {
      "id": "86778b63-9012-435c-86fe-0298084570da",
      "name": "Update HubSpot Contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1250,
        440
      ],
      "parameters": {
        "resource": "contact",
        "contactId": "={{ $('Build Prospect Record').item.json.contactId }}",
        "operation": "update",
        "updateFields": {
          "phone": "={{ $('Build Prospect Record').item.json.phone }}",
          "company": "={{ $('Build Prospect Record').item.json.company }}",
          "industry": "={{ $('Build Prospect Record').item.json.industry }}",
          "jobtitle": "={{ $('Build Prospect Record').item.json.jobTitle }}"
        }
      },
      "credentials": {
        "hubspotOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "960542ce-11f4-4fcf-bc90-9f4d8a812f19",
      "name": "Log Skipped Contact",
      "type": "n8n-nodes-base.code",
      "position": [
        1250,
        600
      ],
      "parameters": {
        "jsCode": "// Log contacts that couldn't be enriched\nreturn { json: {\n  status: 'skipped',\n  reason: 'No valid email found by Lusha',\n  contactId: $json.contactId,\n  email: $json.email,\n  name: `${$json.firstName} ${$json.lastName}`,\n  skippedAt: new Date().toISOString()\n} };"
      },
      "typeVersion": 2
    },
    {
      "id": "f7510ffd-263f-411a-9aac-eddca2dd97c7",
      "name": "Notify Skip on Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1550,
        600
      ],
      "parameters": {
        "text": "=\u26a0\ufe0f *Sequence Contact Not Enriched*\n\n{{ $json.name }} ({{ $json.email }})\nReason: {{ $json.reason }}\n_Contact was not added to outreach sequence._",
        "channel": "#enrichment-logs",
        "otherOptions": {}
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    }
  ],
  "connections": {
    "Has Valid Email?": {
      "main": [
        [
          {
            "node": "Add to Outreach Sequence",
            "type": "main",
            "index": 0
          },
          {
            "node": "Update HubSpot Contact",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Skipped Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich with Lusha": {
      "main": [
        [
          {
            "node": "Build Prospect Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Skipped Contact": {
      "main": [
        [
          {
            "node": "Notify Skip on Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Prospect Record": {
      "main": [
        [
          {
            "node": "Has Valid Email?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Contact Added to Sequence": {
      "main": [
        [
          {
            "node": "Enrich with Lusha",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}