{
  "name": "Generate personalized cold emails with Anthropic, GPT-4 & Google Sheets",
  "nodes": [
    {
      "id": "0eac1a6b-0b4d-47d8-a80a-e9943dd8b1a1",
      "name": "Create a draft",
      "type": "n8n-nodes-base.gmail",
      "position": [
        5456,
        -288
      ]
    },
    {
      "id": "e9e12661-7809-4b13-ac5a-cfa01e1fef87",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        3440,
        -304
      ]
    },
    {
      "id": "fdb78e15-cb51-486e-a113-01b6b6abd09f",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        2352,
        -1456
      ]
    },
    {
      "id": "882fb7a2-7ba4-48f9-8b4c-499814a56dd3",
      "name": "Get All Leads",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2576,
        -1456
      ]
    },
    {
      "id": "dac7abb5-e34c-4cd9-b794-22d1130dc136",
      "name": "Filter (Qualified Leads)",
      "type": "n8n-nodes-base.filter",
      "position": [
        2800,
        -1456
      ]
    },
    {
      "id": "5bc390bb-567c-44ad-a2e3-ed0cb585ef9d",
      "name": "Loop Over Leads",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1872,
        -1104
      ]
    },
    {
      "id": "9982c117-d123-4568-952a-4d35cc3de958",
      "name": "Extract Text & Links",
      "type": "n8n-nodes-base.html",
      "position": [
        2720,
        -544
      ]
    },
    {
      "id": "5e749a6e-921b-426f-8991-d1b4d3f5c00c",
      "name": "Scrape Site",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2496,
        -544
      ]
    },
    {
      "id": "34a3caf7-d823-46c7-8588-87d5a83e78ff",
      "name": "Capture Lead Data",
      "type": "n8n-nodes-base.set",
      "position": [
        2272,
        -544
      ]
    },
    {
      "id": "974fcfea-1921-45a4-99d4-761b2d43e608",
      "name": "Filter Social & Status",
      "type": "n8n-nodes-base.code",
      "position": [
        2944,
        -544
      ]
    },
    {
      "id": "97a1c64c-e02e-42c7-82c4-50ba4d6df06f",
      "name": "Summarize Website",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        3920,
        -544
      ]
    },
    {
      "id": "bf426de8-d6e3-4474-8f5e-0541277f1f56",
      "name": "Merge Summary",
      "type": "n8n-nodes-base.set",
      "position": [
        4272,
        -544
      ]
    },
    {
      "id": "ac63c0ff-87a5-41f1-82e3-b22498bfecf8",
      "name": "Generate Subject & Body",
      "type": "@n8n/n8n-nodes-langchain.anthropic",
      "position": [
        4496,
        -544
      ]
    },
    {
      "id": "444404fd-8635-4485-943a-f78df5b66e07",
      "name": "Parse AI Output",
      "type": "n8n-nodes-base.code",
      "position": [
        4848,
        -544
      ]
    },
    {
      "id": "23fbfc16-e835-437c-8cb0-a3ad0ee2e758",
      "name": "Log Final Result",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        5232,
        -288
      ]
    },
    {
      "id": "ab1d0b36-d848-461a-9252-2628590feccc",
      "name": "Send Team Completion Alert",
      "type": "n8n-nodes-base.gmail",
      "position": [
        5344,
        -1120
      ]
    },
    {
      "id": "a4d963e7-ebea-4a65-bca2-c7ce38c16161",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3888,
        -944
      ],
      "parameters": {
        "width": 1088,
        "height": 592,
        "content": "## **4. AI Personalization Engine**\n\n### 1.  **OpenAI (Summarize Website Hook):** \nUses **GPT-4** (or gpt-4o) with a low **Temperature (0.1)** to analytically extract the **Unique Operational Insight*"
      }
    },
    {
      "id": "3ca20d99-a682-41bb-be20-d0256b665f69",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3232,
        -944
      ],
      "parameters": {
        "width": 544,
        "height": 896,
        "content": "## **3. IF (Filtering)** \n\n**Goal:** Control execution flow and maximize **LLM token cost efficiency** by diverting bad leads.\n\nThis node is a critical architectural decision point that acts as a **Qu"
      }
    },
    {
      "id": "bbdae9ce-cfef-4349-9b53-4f2454f9d005",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2176,
        -1696
      ],
      "parameters": {
        "width": 928,
        "height": 496,
        "content": "## **1. Data Ingestion & Filtering**\n\n### 1.  **Get All Leads:** \nReplace the placeholder **Spreadsheet ID** and **Sheet Name** with your master lead sheet details.\n    \n### 2.  **Filter:** \nThis node"
      }
    },
    {
      "id": "2d3bdc9c-d0be-486c-980e-1095de1d2952",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2176,
        -944
      ],
      "parameters": {
        "width": 928,
        "height": 608,
        "content": "## **2. Scraping & Data Shaping**\n\n### 1.  **HTTP Request (Scrape Site):** \nEnsure the URL uses the stable expression ={{ $json.website\\_url }}. **Response Format** is set to **File** to correctly del"
      }
    },
    {
      "id": "e0c20f03-b200-42ee-bf9e-a8fed167aab4",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5072,
        -1216
      ],
      "parameters": {
        "width": 640,
        "height": 1168,
        "content": "## **5. Logging, Draft and Alert**\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 1.  **Google Sheets (Log Final Result):** \nThis node uses the id for matching and writes the final data. It handles both **Success Path** ("
      }
    },
    {
      "id": "94a21ec9-b05b-4737-8a06-52d6a4292f98",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -1840
      ],
      "parameters": {
        "width": 544,
        "height": 336,
        "content": "# Hello there!\n\n\n\n# Need support or have a workflow question?  \n\n## 🔗 [Connect on LinkedIn](https://www.linkedin.com/in/bhuvaneshhhh/)"
      }
    },
    {
      "id": "a466d18b-11a8-4ef0-98e5-0c999a32aee4",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        -1840
      ],
      "parameters": {
        "width": 4224,
        "height": 2016,
        "content": ""
      }
    },
    {
      "id": "772a5fab-5af7-48ce-9d7c-76051e02535e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -1456
      ],
      "parameters": {
        "width": 544,
        "height": 944,
        "content": "# Personalized Cold Email Generator\n\n\n### Stage 1: Data Acquisition and Resilience\n\nThe process begins by reading qualified leads from **Google Sheets** and initiating a **Loop Over Leads** to process"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Summarize Website",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log Final Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Site": {
      "main": [
        [
          {
            "node": "Extract Text & Links",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Leads": {
      "main": [
        [
          {
            "node": "Filter (Qualified Leads)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Summary": {
      "main": [
        [
          {
            "node": "Generate Subject & Body",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a draft": {
      "main": [
        [
          {
            "node": "Loop Over Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Get All Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Leads": {
      "main": [
        [
          {
            "node": "Send Team Completion Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Capture Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Output": {
      "main": [
        [
          {
            "node": "Log Final Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Final Result": {
      "main": [
        [
          {
            "node": "Create a draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Capture Lead Data": {
      "main": [
        [
          {
            "node": "Scrape Site",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize Website": {
      "main": [
        [
          {
            "node": "Merge Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text & Links": {
      "main": [
        [
          {
            "node": "Filter Social & Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Social & Status": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Subject & Body": {
      "main": [
        [
          {
            "node": "Parse AI Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter (Qualified Leads)": {
      "main": [
        [
          {
            "node": "Loop Over Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}