{
  "id": "S5QDGzh0Awkpm2WX",
  "name": "Enrich Person Data",
  "tags": [],
  "nodes": [
    {
      "id": "0dae57b1-df37-49eb-b848-64eb7fd2fadc",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -100,
        -160
      ],
      "parameters": {
        "options": {},
        "formTitle": "Enrich person data",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Person name",
              "requiredField": true
            },
            {
              "fieldLabel": "Work email",
              "requiredField": true
            },
            {
              "fieldLabel": "Airtop Profile (connected to Linkedin)",
              "requiredField": true
            },
            {
              "fieldLabel": "Hubspot object id",
              "requiredField": true
            }
          ]
        },
        "formDescription": "This automation searches for the contact's info and enriches the data accordingly"
      },
      "typeVersion": 2.2
    },
    {
      "id": "c4843e84-c494-4afa-b02b-7592a34e8ff8",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -100,
        40
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "Person name"
            },
            {
              "name": "Work email"
            },
            {
              "name": "Airtop Profile (connected to Linkedin)"
            },
            {
              "name": "Hubspot object id"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "6096f8cf-544c-4f10-b8bd-91df31e30dd8",
      "name": "Save data in Hubspot",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        1000,
        -60
      ],
      "parameters": {
        "options": {},
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "FRqHMdMl7HRqBQ5X",
          "cachedResultName": "AIRTOP \u2014 Update Hubspot contact"
        },
        "workflowInputs": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "00c52797-499f-4753-9bdd-457286675a7d",
      "name": "Extract person info and calculate ICP",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        340,
        -60
      ],
      "parameters": {
        "options": {},
        "workflowId": {
          "__rl": true,
          "mode": "list",
          "value": "UY2lflocNrJbhBkQ",
          "cachedResultName": "AIRTOP \u2014 Extract person data and calculate ICP"
        },
        "workflowInputs": {
          "value": {
            "work_email": "={{ $json.email }}",
            "person_name": "={{ $json.name }}",
            "Airtop_profile": "={{ $json.airtop_profile }}"
          },
          "schema": [
            {
              "id": "person_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "person_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "work_email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "work_email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Airtop_profile",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Airtop_profile",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e8c99f0a-1ae7-49b0-b380-7218da0923a4",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        560,
        -60
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": ""
      },
      "typeVersion": 1
    },
    {
      "id": "178e4989-f032-4d01-82b6-d649c467e973",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        780,
        -60
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e51e5b25-bbc2-4326-856e-c457d3a6a303",
              "name": "email",
              "type": "string",
              "value": "={{ $('Unify Params').item.json.email }}"
            },
            {
              "id": "68e09599-27fc-49ae-9ae5-96c067103b3f",
              "name": "current_company",
              "type": "string",
              "value": "={{ $json[\"\"][2].current_or_last_employer }}"
            },
            {
              "id": "43666dd1-ba2d-4d49-8e22-9503ee0d0238",
              "name": "linkedin_company_url",
              "type": "string",
              "value": "={{ $json[\"\"][2].linkedin_company_url }}"
            },
            {
              "id": "9d0e2c2e-2018-4caf-8799-00b12b584411",
              "name": "linkedin_connections",
              "type": "number",
              "value": "={{ $json[\"\"][2].number_of_connections }}"
            },
            {
              "id": "f1da6e95-dda9-4961-a1a9-982e25c13b06",
              "name": "linkedin_followers",
              "type": "number",
              "value": "={{ $json[\"\"][2].number_of_followers }}"
            },
            {
              "id": "19f9c053-b943-48bb-978e-750618e3cf5a",
              "name": "linkedin_url",
              "type": "string",
              "value": "={{ $json[\"\"][1].data.modelResponse }}"
            },
            {
              "id": "1b947dad-20b6-4cdb-b3f0-9d76a8b64222",
              "name": "linkedin_about",
              "type": "string",
              "value": "={{ $json[\"\"][2].about_section_text }}"
            },
            {
              "id": "61d013b4-5bad-485a-b470-c7e3d632dfc3",
              "name": "icp_person_score",
              "type": "number",
              "value": "={{ $json[\"\"][2].icp_score }}"
            },
            {
              "id": "a8b19e7f-a78c-4f7d-80dc-7e4838b76624",
              "name": "seniority_level",
              "type": "string",
              "value": "={{ $json[\"\"][2].seniority_level }}"
            },
            {
              "id": "6087b8cb-1898-4f61-a0b7-83e8dfdf8214",
              "name": "technical_depth",
              "type": "string",
              "value": "={{ $json[\"\"][2].technical_depth }}"
            },
            {
              "id": "90881cae-54e7-4713-8146-e0c2c78d6bd7",
              "name": "ai_interest_level",
              "type": "string",
              "value": "={{ $json[\"\"][2].ai_interest_level }}"
            },
            {
              "id": "42574d66-0805-449c-a943-68c0c049da5e",
              "name": "object_id",
              "type": "number",
              "value": "={{ $('Unify Params').item.json.object_id }}"
            },
            {
              "id": "3a33831a-cd02-4da3-bbf4-cde793bfd3a9",
              "name": "location",
              "type": "string",
              "value": "={{ $json[\"\"][0].location }}"
            },
            {
              "id": "67244081-d1b9-4c95-b44c-5d69c68fc6aa",
              "name": "full_name",
              "type": "string",
              "value": "={{ $json[\"\"][0].name }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1bc0806d-c370-4ef0-b7a6-5cbf9ee13dc1",
      "name": "Unify Params",
      "type": "n8n-nodes-base.set",
      "position": [
        120,
        -60
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c1ff872c-1f19-4ff5-b15f-0529aef35b87",
              "name": "object_id",
              "type": "string",
              "value": "={{ $json[\"Hubspot object id\"] }}"
            },
            {
              "id": "443cf739-dce5-4446-aab0-ab6f884175b6",
              "name": "name",
              "type": "string",
              "value": "={{ $json[\"Person name\"] }}"
            },
            {
              "id": "ed85589d-fefc-4b2c-8e6b-f4f6869c372c",
              "name": "email",
              "type": "string",
              "value": "={{ $json[\"Work email\"] }}"
            },
            {
              "id": "8f6b8a72-72b8-4a4b-8469-5b00a3b97780",
              "name": "airtop_profile",
              "type": "string",
              "value": "={{ $json[\"Airtop Profile (connected to Linkedin)\"] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ac99db58-4bbe-41b7-a38a-352f1146facc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -140,
        -260
      ],
      "parameters": {
        "width": 400,
        "height": 460,
        "content": "## Input Parameters\n** Run this workflow using a form or from another workflow"
      },
      "typeVersion": 1
    },
    {
      "id": "ddec76a7-1424-4a8f-a78a-4fe4daae5ad2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        -260
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 460,
        "content": "## Retrieve person info"
      },
      "typeVersion": 1
    },
    {
      "id": "02552097-ed67-4df2-a333-e165091f5080",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        520,
        -260
      ],
      "parameters": {
        "color": 6,
        "width": 620,
        "height": 460,
        "content": "## Save info in Hubspot"
      },
      "typeVersion": 1
    },
    {
      "id": "26c4a218-abd8-4272-92be-aaf7e56eea66",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -860,
        -540
      ],
      "parameters": {
        "width": 700,
        "height": 1000,
        "content": "README\n\n# Automating Person Data Enrichment and CRM Update\n\n## Use Case\n\nThis automation enriches a person\u2019s professional profile using their name and work email, scores them against an ICP (Ideal Customer Profile), and updates their record in HubSpot. It\u2019s ideal for sales, marketing, and recruitment teams needing reliable contact insights.\n\n## What This Automation Does\n\nThis automation performs the following using the input parameters:\n\n- **Person name**: The full name of the individual.\n- **Work email**: The professional email address of the contact.\n- **Airtop Profile (connected to LinkedIn)**: An authenticated [Airtop Profile](https://portal.airtop.ai/browser-profiles) used for LinkedIn-based enrichment.\n- **Hubspot object id**: The internal HubSpot ID for the contact to be updated.\n\n## How It Works\n\n1. Initiates the workflow using a form or external trigger.\n2. Uses the name and email to extract and enrich the person\u2019s data, including:\n   - LinkedIn profile and company page\n   - About section, job title, location\n   - ICP score, seniority level, AI interest, technical depth, connection and follower counts\n3. Formats and maps the enriched data.\n4. Pushes the updated data to HubSpot using the object ID.\n\n## Setup Requirements\n\n1. [Airtop API Key](https://portal.airtop.ai/api-keys)\n2. [Airtop Profile](https://portal.airtop.ai/browser-profiles) logged in to LinkedIn.\n3. HubSpot access with object ID field for each contact to update.\n\n## Next Steps\n\n- **Combine with Lead Generation**: Use as part of an end-to-end workflow that sources leads and enriches them in real time.\n- **Trigger from CRM**: Initiate this workflow when a new contact is added in HubSpot or another CRM.\n- **Customize Scoring Logic**: Tailor the ICP calculation to your team\u2019s specific criteria.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "99ffa5d9-95cd-4a6f-b905-32053a6c50b0",
  "connections": {
    "Aggregate": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Save data in Hubspot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unify Params": {
      "main": [
        [
          {
            "node": "Extract person info and calculate ICP",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Unify Params",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save data in Hubspot": {
      "main": [
        []
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Unify Params",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract person info and calculate ICP": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}