{
  "name": "Classify & enrich contacts with GPT-4o-mini for Google Sheets, Airtable, and HubSpot",
  "nodes": [
    {
      "id": "09b19752-a5fe-4786-8477-2e8605d62330",
      "name": "⏰ Run Every Hour",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1880,
        100
      ]
    },
    {
      "id": "308fbf64-8376-4168-9ac3-19e1f85fc654",
      "name": "📄 Read Pending Contacts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1660,
        100
      ]
    },
    {
      "id": "a865ab5b-0bf7-4bb9-b2b8-50fd628ed563",
      "name": "🧪 Filter Name & Email",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1440,
        100
      ]
    },
    {
      "id": "990bf325-2704-4fbb-af01-e0c9518b0c4b",
      "name": "🧹 Clean Contact Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -1220,
        100
      ]
    },
    {
      "id": "6a728a8e-d85b-49a1-ae41-a5c086fefbf5",
      "name": "🧠 LLM - GPT-4o-mini",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1000,
        100
      ]
    },
    {
      "id": "bea8cbb6-bc03-4360-94a0-7ede08702e31",
      "name": "🧩 Parse or Fallback Role Tags",
      "type": "n8n-nodes-base.code",
      "position": [
        -624,
        100
      ]
    },
    {
      "id": "7a092066-611a-49ce-8b0e-97645761372f",
      "name": "🧠 Classify Role & Seniority",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -912,
        320
      ]
    },
    {
      "id": "4ec658e5-df8a-4cec-ba25-a6b0db684c7b",
      "name": "📊 Update Contact in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -404,
        -100
      ]
    },
    {
      "id": "ad2c304c-c36c-4be0-80cd-726baa0b2e47",
      "name": "🔁 Sync to Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -404,
        100
      ]
    },
    {
      "id": "29fd44b3-50ae-4259-a70f-101c3ed62a81",
      "name": "📬 Push to HubSpot",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        -404,
        300
      ]
    },
    {
      "id": "56bf9c8a-37b3-4d7e-8bbb-27b14ba9a3dd",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1940,
        -120
      ],
      "parameters": {
        "width": 220,
        "height": 460,
        "content": "## Step-1\n\n**This is the automated schedule to trigger the workflow every hour to fetch and process new contacts.**\n"
      }
    },
    {
      "id": "2dd459b2-a6dc-49e6-ae65-8b9f82c42599",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1700,
        -120
      ],
      "parameters": {
        "width": 420,
        "height": 460,
        "content": "## Step-2\n\n**Reads rows from Google Sheets where Status = \"Pending\" and filters out any row missing essential fields like Name or Email.**"
      }
    },
    {
      "id": "8a157923-e604-4a67-80be-a1f66922a5ff",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1260,
        -120
      ],
      "parameters": {
        "width": 200,
        "height": 460,
        "content": "## Step-3\n\n**Cleans up field names and fills in defaults (Title, Company, LinkedIn, etc.)**"
      }
    },
    {
      "id": "d43ba817-75fc-4064-8d7a-9adeea81fe4c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1040,
        -120
      ],
      "parameters": {
        "width": 540,
        "height": 600,
        "content": "## Step-4\n\n**Classifies contact by Function, Seniority, and Department using GPT-4o-mini.\nParses AI response; if it fails, applies keyword-based fallback.\nAdds analyzed_at timestamp..**"
      }
    },
    {
      "id": "4189b779-9569-4890-aadd-d88b046d4e33",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -260
      ],
      "parameters": {
        "width": 460,
        "height": 740,
        "content": "## Step-5\n\n**Distributes enriched contact to:\n✅ Google Sheet (adds function, seniority, marks Reviewed)\n✅ Airtable CRM (upserts by email)\n✅ HubSpot CRM (creates/updates contact)**"
      }
    }
  ],
  "connections": {
    "⏰ Run Every Hour": {
      "main": [
        [
          {
            "node": "📄 Read Pending Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧠 LLM - GPT-4o-mini": {
      "main": [
        [
          {
            "node": "🧩 Parse or Fallback Role Tags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧹 Clean Contact Data": {
      "main": [
        [
          {
            "node": "🧠 LLM - GPT-4o-mini",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧪 Filter Name & Email": {
      "main": [
        [
          {
            "node": "🧹 Clean Contact Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📄 Read Pending Contacts": {
      "main": [
        [
          {
            "node": "🧪 Filter Name & Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧠 Classify Role & Seniority": {
      "ai_languageModel": [
        [
          {
            "node": "🧠 LLM - GPT-4o-mini",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "🧩 Parse or Fallback Role Tags": {
      "main": [
        [
          {
            "node": "📊 Update Contact in Sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "🔁 Sync to Airtable",
            "type": "main",
            "index": 0
          },
          {
            "node": "📬 Push to HubSpot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}