{
  "name": "Automate company data enrichment with HubSpot, Sona, OpenAI & Google Sheets",
  "nodes": [
    {
      "id": "81c10c26-e46e-4af2-ad49-c2007792c8d9",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -128,
        384
      ]
    },
    {
      "id": "892216a0-c898-4e58-add6-be9114a750d4",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        64,
        384
      ]
    },
    {
      "id": "4cd029da-490b-4c55-a34a-a6d159b991db",
      "name": "Sona Enrich",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        80,
        1040
      ]
    },
    {
      "id": "eff70326-9d2f-4d54-b8e8-9c10d8cb1a5b",
      "name": "End",
      "type": "n8n-nodes-base.noOp",
      "position": [
        208,
        944
      ]
    },
    {
      "id": "e6ce8d18-2541-40e1-8391-53f786f13cdc",
      "name": "Start",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -800,
        160
      ]
    },
    {
      "id": "8f0ba93b-ebfe-45a8-931e-adfd8ed0c82d",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        -80
      ],
      "parameters": {
        "width": 640,
        "height": 752,
        "content": "## 📥 Step 1: Data Input & Web Scraping\n\n**What happens here:**\n\n- Reads company domains from Google Sheets\n- Scrapes each website's content\n- Extracts and cleans main content\n- Removes navigation, foo"
      }
    },
    {
      "id": "24f14c39-7a04-4f9e-ac10-fb44f31b14a6",
      "name": "Get Company List from Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -608,
        160
      ]
    },
    {
      "id": "ac572ae7-f872-4b8a-8e45-453aa67eaaec",
      "name": "Scrape Website Content",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -416,
        160
      ]
    },
    {
      "id": "1bdb07f6-0638-4769-b88b-5f9bd0c14023",
      "name": "Extract HTML Content",
      "type": "n8n-nodes-base.html",
      "position": [
        -720,
        416
      ]
    },
    {
      "id": "5ef72bdd-867a-4cda-98df-e72d50f4d1ee",
      "name": "Clean & Format Text",
      "type": "n8n-nodes-base.code",
      "position": [
        -464,
        416
      ]
    },
    {
      "id": "3424801c-26e3-4e2b-811e-4b2e2a725c2e",
      "name": "Analyze with AI",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -128,
        208
      ]
    },
    {
      "id": "717ba359-77a2-4f4d-8c55-fc51c7fc9cf4",
      "name": "Collect AI Results",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        304,
        496
      ]
    },
    {
      "id": "6c3343b8-98f3-4776-b67a-8cd80069a4b2",
      "name": "Create Custom HubSpot Fields",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -752,
        960
      ]
    },
    {
      "id": "7ccc1fc6-a20d-4130-9838-7a63d5a516aa",
      "name": "Prepare Data for Loop",
      "type": "n8n-nodes-base.set",
      "position": [
        -544,
        960
      ]
    },
    {
      "id": "f2fe5930-9eea-4b4c-bfda-067e9046135d",
      "name": "Split Companies and AI Output into Items",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -352,
        960
      ]
    },
    {
      "id": "df55c5f6-7d36-418e-aa21-3ef98b0c91a4",
      "name": "Loop Through Companies",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -128,
        960
      ]
    },
    {
      "id": "0747c56e-ec5f-4168-a5e8-a051441c5b29",
      "name": "Create HubSpot Company",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        -96,
        1264
      ]
    },
    {
      "id": "a6b81f29-4a05-44a1-af2e-0746f6acd949",
      "name": "Format Custom Properties",
      "type": "n8n-nodes-base.code",
      "position": [
        80,
        1264
      ]
    },
    {
      "id": "94f7499d-445c-4542-9b50-92912e7f3433",
      "name": "Update Company with AI Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        256,
        1264
      ]
    },
    {
      "id": "af82b0d9-5df4-4a72-9170-c86b32ebae24",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -80
      ],
      "parameters": {
        "width": 640,
        "height": 752,
        "content": "## 🤖 Step 2: AI Analysis\n\n**What happens here:**\n- Sends cleaned content to OpenAI\n- Extracts structured company intelligence\n- Identifies positioning, features, personas\n- Captures pricing, pros/cons"
      }
    },
    {
      "id": "7b4af74d-5f84-4b0a-b536-370a7d109892",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        688
      ],
      "parameters": {
        "width": 640,
        "height": 752,
        "content": "## ⚙️ Step 3: HubSpot Preparation\n\n**What happens here:**\n- Creates custom fields in HubSpot CRM\n- Prepares AI-extracted data for import\n- Splits aggregated data into individual companies\n- Ready for "
      }
    },
    {
      "id": "43ccb613-c2b8-4129-996b-8fcae1f7f708",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        688
      ],
      "parameters": {
        "width": 640,
        "height": 752,
        "content": "## 🔄 Step 4: Enrich & Sync to HubSpot\n\n**What happens here:**\n- Loops through each company one by one\n- Enriches with Sona API (firmographics, revenue, employees)\n- Creates company record in HubSpot\n-"
      }
    },
    {
      "id": "a6c7e5b4-4908-4244-a950-751a0c21ed59",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1632,
        -80
      ],
      "parameters": {
        "width": 752,
        "height": 1072,
        "content": "# Enrich HubSpot Companies: Firmographics, tech & AI-powered custom attributes\n\n## ✅ Setup Requirements\n\n**Before running this workflow, you need:**\n\n1. **Google Sheets** with a column named `Website "
      }
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Get Company List from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sona Enrich": {
      "main": [
        [
          {
            "node": "Create HubSpot Company",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Analyze with AI": {
      "main": [
        [
          {
            "node": "Collect AI Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze with AI",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Collect AI Results": {
      "main": [
        [
          {
            "node": "Create Custom HubSpot Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Clean & Format Text": {
      "main": [
        [
          {
            "node": "Analyze with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract HTML Content": {
      "main": [
        [
          {
            "node": "Clean & Format Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Data for Loop": {
      "main": [
        [
          {
            "node": "Split Companies and AI Output into Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create HubSpot Company": {
      "main": [
        [
          {
            "node": "Format Custom Properties",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Through Companies": {
      "main": [
        [
          {
            "node": "End",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sona Enrich",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Website Content": {
      "main": [
        [
          {
            "node": "Extract HTML Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Custom Properties": {
      "main": [
        [
          {
            "node": "Update Company with AI Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze with AI",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Get Company List from Sheet": {
      "main": [
        [
          {
            "node": "Scrape Website Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Company with AI Data": {
      "main": [
        [
          {
            "node": "Loop Through Companies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Custom HubSpot Fields": {
      "main": [
        [
          {
            "node": "Prepare Data for Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Companies and AI Output into Items": {
      "main": [
        [
          {
            "node": "Loop Through Companies",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}