{
  "name": "Run AI-scored cold email outreach and follow-ups with Ollama and Gmail",
  "nodes": [
    {
      "id": "ff288d70-ed51-4639-a4fc-cd9f84c57e73",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 620,
        "height": 860,
        "content": "## AI SDR — Fully Automated Cold Outreach with Scoring and Follow-ups\nAutomate your entire cold email pipeline: lead research, AI scoring, personalized email generation, sending, follow-ups, and reply"
      }
    },
    {
      "id": "e6bd6e84-b8d3-4233-a3ba-a9f1e84abae2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        640
      ],
      "parameters": {
        "width": 2260,
        "height": 380,
        "content": "## 🔬 Research, Score & Send\nScrapes lead websites, builds research dossiers, scores with AI, generates 3 personalized emails, and sends Email 1 immediately."
      }
    },
    {
      "id": "90cd7117-dd95-4f9a-b230-d6f9ddef14c8",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        1104
      ],
      "parameters": {
        "width": 1260,
        "height": 420,
        "content": "## 📧 Follow-up Engine\nSends Email 2 after 3 days and Email 3 after 7 days. Skips leads that have already replied."
      }
    },
    {
      "id": "3be24aab-7a78-45c3-b88f-c602bcbefa28",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        912,
        1584
      ],
      "parameters": {
        "width": 1304,
        "height": 420,
        "content": "## 📬 Reply Detection\nSearches Gmail for replies from active leads. Marks them as \"replied\" and stops the email sequence automatically."
      }
    },
    {
      "id": "0ec61a66-98cf-4a44-84d9-37b22611b70e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2608,
        1904
      ],
      "parameters": {
        "width": 460,
        "height": null,
        "content": "## ⚠️ Set your Gmail address\nEdit line 10 in both **Filter Active Leads** and **Check Reply Results** code nodes — replace `your-email@gmail.com` with your actual sending Gmail address. This prevents "
      }
    },
    {
      "id": "b43da6bf-e5a3-480e-953d-54d135e68bee",
      "name": "⏰ 8 AM — New Leads",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        928,
        752
      ]
    },
    {
      "id": "00d418c1-2115-466b-9e5e-190b83333889",
      "name": "📋 Read Sheet (New)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1152,
        752
      ]
    },
    {
      "id": "53f04d54-e0be-4437-8e4b-37bc17257e32",
      "name": "🆕 Filter New",
      "type": "n8n-nodes-base.code",
      "position": [
        1376,
        752
      ]
    },
    {
      "id": "6d454456-c5c1-4060-8006-c1ec1daeb7a5",
      "name": "🆕 Has Leads?",
      "type": "n8n-nodes-base.if",
      "position": [
        1600,
        752
      ]
    },
    {
      "id": "77fc3456-e21c-4b0e-9434-d7a6a1e500cf",
      "name": "🌐 Scrape Website",
      "type": "n8n-nodes-base.code",
      "position": [
        1824,
        656
      ]
    },
    {
      "id": "a407e7ad-a48a-49f2-8c4c-b867a9dc2b51",
      "name": "📄 Build Dossier",
      "type": "n8n-nodes-base.code",
      "position": [
        2048,
        656
      ]
    },
    {
      "id": "975ad2ef-3697-451e-b7cc-4b84795a5ae4",
      "name": "📊 AI Lead Scorer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2272,
        656
      ]
    },
    {
      "id": "7454887b-5a92-4d21-b927-f8124a31eb27",
      "name": "🎯 Extract Score",
      "type": "n8n-nodes-base.code",
      "position": [
        2624,
        656
      ]
    },
    {
      "id": "268c6d25-e5fb-4157-bb26-6a13c235a14a",
      "name": "📊 Pursue?",
      "type": "n8n-nodes-base.if",
      "position": [
        2848,
        656
      ]
    },
    {
      "id": "e84960a8-3d0b-484d-a436-3d37174a8c5e",
      "name": "✍️ AI Email Writer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3072,
        400
      ]
    },
    {
      "id": "b51ecaf0-3369-41ed-b2b5-d1a8fbddf1cf",
      "name": "📝 Extract Emails",
      "type": "n8n-nodes-base.code",
      "position": [
        3424,
        512
      ]
    },
    {
      "id": "6f9bc1bd-d6da-4415-9326-130018f64386",
      "name": "📧 Send Email 1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3648,
        512
      ]
    },
    {
      "id": "7be872d9-8aef-43fe-b79c-aa848628fef9",
      "name": "💾 Save + Mark Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3872,
        608
      ]
    },
    {
      "id": "1441a932-a034-4196-b322-ac6272e7af10",
      "name": "📲 Email 1 Sent ✅",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3872,
        416
      ]
    },
    {
      "id": "3b92637a-f2c2-432c-b957-03ecf5526c8a",
      "name": "⏭️ Mark Skipped",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3136,
        800
      ]
    },
    {
      "id": "835b1e19-c429-4814-92e4-d15dd031ac76",
      "name": "📲 Skipped",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3424,
        800
      ]
    },
    {
      "id": "c4316023-e077-4889-ac3d-86ad9059d458",
      "name": "💤 No New Leads",
      "type": "n8n-nodes-base.code",
      "position": [
        1824,
        848
      ]
    },
    {
      "id": "9da28257-a906-4425-81f9-a11fde5a8864",
      "name": "⏰ Every 2hrs — Follow-ups",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        928,
        1264
      ]
    },
    {
      "id": "cffcf037-6615-4705-8a8f-49dbbcbe1e40",
      "name": "📋 Read Sheet (Follow-ups)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1152,
        1264
      ]
    },
    {
      "id": "44cea630-cb7a-461f-9459-0b602f839d00",
      "name": "🔍 Find Follow-ups",
      "type": "n8n-nodes-base.code",
      "position": [
        1376,
        1264
      ]
    },
    {
      "id": "efbc486b-0d8f-4001-bbe4-63cf0ca2dbdd",
      "name": "📧 Has Follow-ups?",
      "type": "n8n-nodes-base.if",
      "position": [
        1600,
        1264
      ]
    },
    {
      "id": "f6c8fed2-d1bc-43d4-bb79-87517538c114",
      "name": "📧 Send Follow-up",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1824,
        1168
      ]
    },
    {
      "id": "999b991c-87ad-402d-a9c3-2ded4af66698",
      "name": "📋 Prepare Update",
      "type": "n8n-nodes-base.code",
      "position": [
        2048,
        1168
      ]
    },
    {
      "id": "852f7db1-c97c-4c6e-9cd6-1f4ff55b382d",
      "name": "✅ Mark Follow-up Sent",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2272,
        1168
      ]
    },
    {
      "id": "9149478f-d8fa-4c9a-8c9c-7f3095661c23",
      "name": "📲 Follow-up Sent",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2272,
        1008
      ]
    },
    {
      "id": "19415433-ff65-4a27-94e6-7c86cacf41b8",
      "name": "💤 Nothing Pending",
      "type": "n8n-nodes-base.code",
      "position": [
        1824,
        1360
      ]
    },
    {
      "id": "f5e432ab-8110-4c6b-a121-2aaa1d6d3826",
      "name": "Ollama Scorer",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        2352,
        880
      ]
    },
    {
      "id": "227b7180-940f-496c-9762-9690f7782591",
      "name": "Ollama Writer",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        3152,
        624
      ]
    },
    {
      "id": "4e08504a-2411-4ce8-a17f-9281ec0c34e6",
      "name": "⏰ Every 2hrs — Reply Check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        928,
        1744
      ]
    },
    {
      "id": "6c1293fa-42f5-485c-9568-179bf8e55414",
      "name": "📋 Read Sheet (Replies)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1152,
        1744
      ]
    },
    {
      "id": "2a290c73-5488-4b01-8bfa-93879cbe60e0",
      "name": "🔍 Filter Active Leads",
      "type": "n8n-nodes-base.code",
      "position": [
        1376,
        1744
      ]
    },
    {
      "id": "e9b61105-f943-4b5d-8edd-2837a0fec3d3",
      "name": "📬 Has Active Leads?",
      "type": "n8n-nodes-base.if",
      "position": [
        1600,
        1744
      ]
    },
    {
      "id": "3a7dc4af-95a5-4434-990e-4e2fc37a4b84",
      "name": "🔎 Search Gmail Replies",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1824,
        1648
      ]
    },
    {
      "id": "a9320a6b-095c-442b-ae07-d7422554dc99",
      "name": "📩 Check Reply Results",
      "type": "n8n-nodes-base.code",
      "position": [
        2048,
        1648
      ]
    },
    {
      "id": "83fe6612-0f68-486a-94fd-0277ddc815d1",
      "name": "💬 Reply Found?",
      "type": "n8n-nodes-base.if",
      "position": [
        2272,
        1648
      ]
    },
    {
      "id": "91a4af5a-cdbd-42c6-bdc9-0eb1245acb04",
      "name": "✅ Mark Replied in Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2496,
        1536
      ]
    },
    {
      "id": "46f06680-5f22-4431-9a79-a934fc9846b8",
      "name": "📲 Reply Alert! 🎉",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2496,
        1376
      ]
    },
    {
      "id": "6985015c-8601-4beb-86d1-7a5c2723231a",
      "name": "💤 No Reply Yet",
      "type": "n8n-nodes-base.code",
      "position": [
        2496,
        1744
      ]
    },
    {
      "id": "6f41120c-93b1-43a7-98cc-8e54bafa2a03",
      "name": "💤 No Active Leads",
      "type": "n8n-nodes-base.code",
      "position": [
        1824,
        1840
      ]
    }
  ],
  "connections": {
    "📊 Pursue?": {
      "main": [
        [
          {
            "node": "✍️ AI Email Writer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "⏭️ Mark Skipped",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Scorer": {
      "ai_languageModel": [
        [
          {
            "node": "📊 AI Lead Scorer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Ollama Writer": {
      "ai_languageModel": [
        [
          {
            "node": "✍️ AI Email Writer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "🆕 Filter New": {
      "main": [
        [
          {
            "node": "🆕 Has Leads?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🆕 Has Leads?": {
      "main": [
        [
          {
            "node": "🌐 Scrape Website",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "💤 No New Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "💬 Reply Found?": {
      "main": [
        [
          {
            "node": "✅ Mark Replied in Sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "📲 Reply Alert! 🎉",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "💤 No Reply Yet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📧 Send Email 1": {
      "main": [
        [
          {
            "node": "💾 Save + Mark Sent",
            "type": "main",
            "index": 0
          },
          {
            "node": "📲 Email 1 Sent ✅",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🎯 Extract Score": {
      "main": [
        [
          {
            "node": "📊 Pursue?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📄 Build Dossier": {
      "main": [
        [
          {
            "node": "📊 AI Lead Scorer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏭️ Mark Skipped": {
      "main": [
        [
          {
            "node": "📲 Skipped",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🌐 Scrape Website": {
      "main": [
        [
          {
            "node": "📄 Build Dossier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📊 AI Lead Scorer": {
      "main": [
        [
          {
            "node": "🎯 Extract Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📋 Prepare Update": {
      "main": [
        [
          {
            "node": "✅ Mark Follow-up Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📝 Extract Emails": {
      "main": [
        [
          {
            "node": "📧 Send Email 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📧 Send Follow-up": {
      "main": [
        [
          {
            "node": "📋 Prepare Update",
            "type": "main",
            "index": 0
          },
          {
            "node": "📲 Follow-up Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📧 Has Follow-ups?": {
      "main": [
        [
          {
            "node": "📧 Send Follow-up",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "💤 Nothing Pending",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔍 Find Follow-ups": {
      "main": [
        [
          {
            "node": "📧 Has Follow-ups?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📋 Read Sheet (New)": {
      "main": [
        [
          {
            "node": "🆕 Filter New",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏰ 8 AM — New Leads": {
      "main": [
        [
          {
            "node": "📋 Read Sheet (New)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "✍️ AI Email Writer": {
      "main": [
        [
          {
            "node": "📝 Extract Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📬 Has Active Leads?": {
      "main": [
        [
          {
            "node": "🔎 Search Gmail Replies",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "💤 No Active Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📩 Check Reply Results": {
      "main": [
        [
          {
            "node": "💬 Reply Found?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔍 Filter Active Leads": {
      "main": [
        [
          {
            "node": "📬 Has Active Leads?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📋 Read Sheet (Replies)": {
      "main": [
        [
          {
            "node": "🔍 Filter Active Leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔎 Search Gmail Replies": {
      "main": [
        [
          {
            "node": "📩 Check Reply Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📋 Read Sheet (Follow-ups)": {
      "main": [
        [
          {
            "node": "🔍 Find Follow-ups",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏰ Every 2hrs — Follow-ups": {
      "main": [
        [
          {
            "node": "📋 Read Sheet (Follow-ups)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏰ Every 2hrs — Reply Check": {
      "main": [
        [
          {
            "node": "📋 Read Sheet (Replies)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}