{
  "id": "lkvu7etwF2YzDpPn",
  "name": "Lead Enrichment + Personalized Icebreaker (Claude)",
  "tags": [],
  "nodes": [
    {
      "id": "e08f27e4-0054-443b-832f-119c36a4d194",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        208
      ],
      "parameters": {
        "color": 4,
        "width": 404,
        "height": 456,
        "content": "## Lead Enrichment + Personalized Icebreaker \n### **How to use:**\n1.  Connect Anthropic (or other model of your choosing) and Google Sheets (or other database of your choosing).\n2. Point the trigger at a sheet with your lead list. Ensure your lead list has the following coluns: \n   - `company`\n   - `website` \n   - `icebreaker` \n   - `icp_fit_score` \n   - `reasoning`\n*Note: icebreaker, icp_fit_score, and reasoning columns will be filled in by the AI. Company and Website are columns that should be filled in by your lead list builder.*\n3. Write your ICP into the Config node\n\nYou're good to run!"
      },
      "typeVersion": 1
    },
    {
      "id": "4ae4fdd1-2114-4f88-9bcc-14139524982d",
      "name": "Sticky Note - Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        208
      ],
      "parameters": {
        "color": 5,
        "width": 236,
        "height": 328,
        "content": "###  Setup\nWrite your ICP here"
      },
      "typeVersion": 1
    },
    {
      "id": "63c9b5c9-35a1-40ad-887b-245d1115496f",
      "name": "Sticky Note - Fetch",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        208
      ],
      "parameters": {
        "color": 7,
        "width": 440,
        "height": 328,
        "content": "### 1. Grab and read the site\nPulls the homepage and turns it into plain text, so the AI has the actual page to work from."
      },
      "typeVersion": 1
    },
    {
      "id": "2d79bb65-e7fd-4d8e-91a8-511f653f55b6",
      "name": "Sticky Note - AI",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        208
      ],
      "parameters": {
        "color": 7,
        "width": 332,
        "height": 320,
        "content": "### 2. Write the icebreaker and score\nAI returns JSON: the icebreaker, a 0-100 fit score, and a short reason."
      },
      "typeVersion": 1
    },
    {
      "id": "e5e22eb7-9740-4d7d-836c-35827791e875",
      "name": "Sticky Note - Write",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        208
      ],
      "parameters": {
        "color": 7,
        "width": 224,
        "height": 328,
        "content": "### 3. Write it back\nUpdates the same row by its row_number"
      },
      "typeVersion": 1
    },
    {
      "id": "ab4aec5c-8428-4f69-a566-c4153675ea96",
      "name": "New Lead Row",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        272,
        384
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Leads",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_GOOGLE_SHEET_ID"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "81d89179-71ed-4578-8617-1f4eb8bee3bb",
      "name": "Fetch Prospect Website",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        832,
        384
      ],
      "parameters": {
        "url": "={{ $json.website }}",
        "options": {
          "timeout": 15000,
          "redirect": {
            "redirect": {}
          },
          "response": {
            "response": {
              "neverError": true
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d968b9ba-6842-43f1-aed8-e51756224f6e",
      "name": "Extract Page Text",
      "type": "n8n-nodes-base.html",
      "position": [
        1104,
        384
      ],
      "parameters": {
        "options": {
          "trimValues": true
        },
        "operation": "extractHtmlContent",
        "extractionValues": {
          "values": [
            {
              "key": "page_text",
              "cssSelector": "body"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9f847e07-2112-467e-9bb8-4b23518b2ea3",
      "name": "Generate Icebreaker + ICP Score",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1328,
        384
      ],
      "parameters": {
        "text": "=You write personalized cold-email icebreakers and score lead fit.\n\nICP DEFINITION:\n{{ $('Config (edit me)').item.json.icp_definition }}\n\nCOMPANY: {{ $('New Lead Row').item.json.company }}\nWEBSITE: {{ $('New Lead Row').item.json.website }}\n\nWEBSITE TEXT (truncated):\n{{ $json.page_text.slice(0, 4000) }}\n\nTASK:\n1. Write ONE personalized opening line (max 25 words) that references something specific and real from the website text. No flattery cliches, no \"I came across your website\". It should sound like a human who actually read the page.\n2. Score 0-100 how well this company fits the ICP above.\n3. Give one short sentence of reasoning for the score.\n\nIf the website text is empty or unusable, set icebreaker to \"[needs manual review]\" and icp_fit_score to 0.",
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.4
    },
    {
      "id": "af68bbd3-021b-4acc-97d5-a278cc1d146b",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        1280,
        672
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-sonnet-4-6",
          "cachedResultName": "Claude Sonnet 4.6"
        },
        "options": {
          "temperature": 0.4
        }
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "0904973f-7e16-4ccd-9119-fa4c258ca5bc",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1488,
        576
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"icebreaker\": \"Saw you just launched a done-for-you SEO retainer for dental clinics. Curious how you're filling those spots.\",\n  \"icp_fit_score\": 82,\n  \"reasoning\": \"Marketing agency running client outbound, mid-size, multiple service lines.\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "61efc480-3672-4d0f-a1e8-bfece0f4ef44",
      "name": "Write Results to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1712,
        384
      ],
      "parameters": {
        "columns": {
          "value": {
            "reasoning": "={{ $json.output.reasoning }}",
            "icebreaker": "={{ $json.output.icebreaker }}",
            "row_number": "={{ $('New Lead Row').item.json.row_number }}",
            "icp_fit_score": "={{ $json.output.icp_fit_score }}"
          },
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "row_number"
          ]
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "Leads",
          "cachedResultName": "Leads"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_GOOGLE_SHEET_ID"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "17e079dc-8db5-4886-895b-e7ba344332ee",
      "name": "Config (edit me)",
      "type": "n8n-nodes-base.set",
      "position": [
        560,
        384
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a1",
              "name": "icp_definition",
              "type": "string",
              "value": "We sell cold-outbound lead-gen systems to US marketing agencies with 5-25 employees and roughly $500K-$5M in revenue. A strong fit runs outbound or cold email for clients, has no dedicated automation engineer, and shows signs of scaling (hiring, case studies, multiple service lines). A weak fit is a solo freelancer, an enterprise, or a company with no outbound motion."
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f75b6fcb-67e7-4f5f-a3f0-d18329d9023c",
      "name": "Sticky Note - Setup1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        560
      ],
      "parameters": {
        "color": 5,
        "width": 188,
        "height": 248,
        "content": "###  AI Model\nFeel free to change this to your preferred model\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "executionOrder": "v1"
  },
  "versionId": "6c4244b9-071d-48d4-8bae-d4363c2c88e4",
  "nodeGroups": [],
  "connections": {
    "New Lead Row": {
      "main": [
        [
          {
            "node": "Config (edit me)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config (edit me)": {
      "main": [
        [
          {
            "node": "Fetch Prospect Website",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Page Text": {
      "main": [
        [
          {
            "node": "Generate Icebreaker + ICP Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Icebreaker + ICP Score",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Prospect Website": {
      "main": [
        [
          {
            "node": "Extract Page Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate Icebreaker + ICP Score",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Icebreaker + ICP Score": {
      "main": [
        [
          {
            "node": "Write Results to Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}