AutomationFlowsAI & RAG › Automate B2b Lead Generation & Personalized Cold Emails with Apollo, Apify & Gpt

Automate B2b Lead Generation & Personalized Cold Emails with Apollo, Apify & Gpt

ByMirai @mirai on n8n.io

This n8n template automates targeted lead discovery, AI-driven data structuring, and personalized cold-email sending at controlled intervals. It’s ideal for sales teams, founders, and agencies that want to scale outreach without losing personalization.

Event trigger★★★★☆ complexityAI-powered24 nodesGoogle SheetsForm TriggerChain LlmHTTP RequestOutput Parser StructuredGmailEmail SendOpenAI
AI & RAG Trigger: Event Nodes: 24 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #9393 — we link there as the canonical source.

This workflow follows the Chainllm → Emailsend recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "HaeyHJ55hJdqFWXF",
  "name": "Colde Email Gen",
  "tags": [],
  "nodes": [
    {
      "id": "4b4b6802-06d6-48b9-8a28-1b6d2d05de78",
      "name": "Add to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1600,
        528
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "e65236a6-d58e-4370-9270-8d16cac6c3fb",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        800,
        96
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "06b9b08c-c859-4825-813b-d4d03e068a0a",
      "name": "Apollo URL Generator",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1008,
        96
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "1c966679-8a61-43da-a277-233a7aaa06f2",
      "name": "Run Apify",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1296,
        96
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "c755b5ac-926b-446d-9ec0-52b6dcb113eb",
      "name": "Limit",
      "type": "n8n-nodes-base.limit",
      "position": [
        576,
        512
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a2911e3b-332e-47f2-8e09-623156872a8c",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        912,
        656
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "a2bd2bb6-7c58-473c-940f-b021a6df99bf",
      "name": "Parse Lead Data",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        752,
        512
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "820ce9cc-edfb-4ca4-953f-e225f2e4975e",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -64
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "023da3f8-2872-4c8a-97cc-ead84c741d92",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        1024,
        512
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "6732b35a-7d00-431b-b959-ee1b9ce05ed0",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2304,
        528
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "4231bbd5-78da-41a6-b07b-14c7f56d08f8",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        2672,
        720
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "42268bfc-af7b-4fe5-bef6-18e2bcf8a28d",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        2736,
        368
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f098ad71-fb9e-4afc-8aef-7c6f030d8de0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        592,
        -192
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6e6b16c4-744d-492d-820f-dd9c7fe0dfb9",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        320
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9c96c62a-7a96-4967-a991-4f145317a422",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        96
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "646d5457-ee42-4b79-8f72-68de028cae81",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1856,
        304
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "0452b6ac-e352-4066-b465-2839adce0803",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2192,
        -112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2754efe3-96c1-43b6-b6c2-8b36a2582b12",
      "name": "message confirming end of work",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2528,
        368
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 2.1
    },
    {
      "id": "3a3080f4-cac6-4f36-b3d6-0ecfa0f9fadc",
      "name": "Sending cold email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2512,
        560
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "dd5e530f-c93d-403d-adaa-27f7f8472d8a",
      "name": "Sending cold email Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2688,
        560
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "1fae88ea-4338-43b8-8c1a-fe02bfba8809",
      "name": "Creating a email",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1856,
        528
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "415b1cb5-11da-44cf-b882-20dcb630df59",
      "name": "Leads without email",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1600,
        384
      ],
      "parameters": {},
      "typeVersion": 4.7
    },
    {
      "id": "bce0c041-9054-40d8-bd2e-cda784590888",
      "name": "Parse Data module",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        688,
        656
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "ce63c6f3-b62f-45aa-b8ec-3cbb86c11390",
      "name": "LINK PASER",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        928,
        192
      ],
      "parameters": {},
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4a0d08e6-0d1c-4b52-b14d-5b777fbcc6db",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Leads without email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Add to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Parse Lead Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Apify": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LINK PASER": {
      "ai_languageModel": [
        [
          {
            "node": "Apollo URL Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse Lead Data": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Creating a email": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [
          {
            "node": "message confirming end of work",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sending cold email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Data module": {
      "ai_languageModel": [
        [
          {
            "node": "Parse Lead Data",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Apollo URL Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sending cold email": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add to Google Sheet": {
      "main": [
        [
          {
            "node": "Creating a email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apollo URL Generator": {
      "main": [
        [
          {
            "node": "Run Apify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Parse Lead Data",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "message confirming end of work": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n template automates targeted lead discovery, AI-driven data structuring, and personalized cold-email sending at controlled intervals. It’s ideal for sales teams, founders, and agencies that want to scale outreach without losing personalization.

Source: https://n8n.io/workflows/9393/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

🎯 Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes — all on autopilot.

OpenAI, HTTP Request, Form Trigger +7
AI & RAG

This end-to-end AI-powered recruitment automation workflow helps HR and talent acquisition teams automate the complete hiring pipeline—from resume intake and parsing to GPT-4-based evaluation, TA appr

Form Trigger, Output Parser Structured, Google Drive +10
AI & RAG

🧠 Automate end-to-end SEO blog creation and WordPress publishing using a GPT-5 multi-agent workflow with real-time research, metadata generation, and optional featured images.

Output Parser Structured, HTTP Request, OpenAI +10
AI & RAG

Code Schedule. Uses memoryBufferWindow, agent, stickyNote, outputParserStructured. Event-driven trigger; 45 nodes.

Memory Buffer Window, Agent, Output Parser Structured +8
AI & RAG

3790. Uses memoryBufferWindow, agent, outputParserStructured, lmChatOpenAi. Event-driven trigger; 45 nodes.

Memory Buffer Window, Agent, Output Parser Structured +8