AutomationFlowsAI & RAG › Automated Lead Research – From Linkedin to Ready-to-send Report

Automated Lead Research – From Linkedin to Ready-to-send Report

ByLukaszB @lukaszb on n8n.io

This workflow is built for professionals and teams who want to scale their B2B outreach with context-rich, personalized communication. It automates the full prospect research process — from pulling lead data and scraping LinkedIn profiles, to gathering real-time company insights…

Event trigger★★★★★ complexityAI-powered36 nodesOpenAI ChatChain LlmOutput Parser StructuredGoogle SheetsHTTP RequestGoogle Docs
AI & RAG Trigger: Event Nodes: 36 Complexity: ★★★★★ AI nodes: yes Added:

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

This workflow follows the Chainllm → Google Sheets 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": "YBHcwnvMQcolHQbs",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Prospect researcher LinkedIn",
  "tags": [],
  "nodes": [
    {
      "id": "26294706-c6b1-452e-a1dc-efa450182cdd",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1940,
        380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a4344c8c-b907-454f-981e-0c00c3ba4c40",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1040,
        380
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "6f4dbb06-71b7-4f25-8fb4-d06b4aae4766",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -400,
        60
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "99087d5c-37fb-420a-85a7-160e2d43b837",
      "name": "check  perplexity research",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -420,
        -100
      ],
      "parameters": {},
      "typeVersion": 1.6
    },
    {
      "id": "4f872b82-e780-4890-8a7d-41d8d6c64234",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -380,
        740
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "64c8e84f-1f53-471f-9641-e377d48c0f53",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -380,
        1020
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "b6474b3e-903d-458e-af9a-443334883649",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        640,
        360
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "77165ac5-db51-4521-9b30-5db198dcbbf4",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -40,
        -100
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "fb0dfafb-814b-458a-ac4c-610f3e65e36f",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        880,
        600
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "749c577a-7f0b-4fe6-ac66-1c6ff0c5fd55",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1140,
        580
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f2ecbb9b-2225-4759-92cc-8ed76c843aed",
      "name": "Analyst of prospect",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        940,
        360
      ],
      "parameters": {},
      "typeVersion": 1.6
    },
    {
      "id": "5cf46861-5b6a-4be9-92e7-66cab0b18bf7",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2020,
        620
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "6b734dbe-c2b9-4881-a8b3-73e4e9ff5b9a",
      "name": "Generate Report",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2040,
        360
      ],
      "parameters": {},
      "typeVersion": 1.6
    },
    {
      "id": "700ec879-2401-4b25-8085-df0d7a677520",
      "name": "Get All Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1620,
        380
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "e8e4e7df-b4bb-4ea1-b683-b6ccdcb62358",
      "name": "Set Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -1380,
        380
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "c6597dd3-77f2-415f-a775-ca100dc1795d",
      "name": "Personal LinkedIn Account POST",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -640,
        740
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "e9fab932-c8c8-4eaf-95ca-4a963ec76278",
      "name": "Personal LinkedIn Account GET",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -120,
        740
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "b7ad91d7-e8da-4706-9409-aed151fd9c68",
      "name": "Company LinkedIn Account POST",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -640,
        1020
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "07555619-0608-49bf-b0ba-ffdeed961053",
      "name": "Company LinkedIn Account GET",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -120,
        1020
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "ba71884b-5072-4d5d-bc3a-0b249869c372",
      "name": "Set Results Personal",
      "type": "n8n-nodes-base.set",
      "position": [
        180,
        740
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "e9624562-4b93-4f7d-b5a6-dba93bce4287",
      "name": "Set Results Company",
      "type": "n8n-nodes-base.set",
      "position": [
        180,
        1020
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "08b6bbd8-9788-4f24-ae7e-0258bf1f677c",
      "name": "Perplexity Search",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -660,
        -100
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 5000
    },
    {
      "id": "edea210f-2bff-4323-b6ea-09e5d53a1603",
      "name": "Set if TRUE",
      "type": "n8n-nodes-base.set",
      "position": [
        220,
        -120
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "2be693ef-108d-470c-b40d-ab76c52acb5d",
      "name": "Set if WRONG",
      "type": "n8n-nodes-base.set",
      "position": [
        220,
        40
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "13f1a968-a0ab-4e88-9811-a670da2bda0b",
      "name": "Perplexity Competitor Research",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1580,
        360
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 5000
    },
    {
      "id": "94f44462-5e19-4406-95fd-8d9712989441",
      "name": "Add report to doc",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        2820,
        360
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "9a1cf89f-f974-407f-a127-067567e9387b",
      "name": "Create doc",
      "type": "n8n-nodes-base.googleDocs",
      "position": [
        2640,
        360
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "4f520fc2-3ac5-43ad-affd-326b7992ed27",
      "name": "Add to sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3100,
        360
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "7fe8d6c7-44ee-402e-a26e-0bb02c227e25",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2020,
        60
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "a5ae4a02-015e-4bb7-9c02-c8d8a7c49938",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        320
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "df56ac90-1e59-4193-aa90-3f9173e38d48",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -760,
        -460
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "38612702-b7bd-4a6a-9a9c-265fa8ba5a97",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        780,
        -100
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8795bb9e-3df3-4763-ba78-f900f65cd2a3",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        -100
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "77112353-600a-4c80-a7f4-c17261d87e41",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1380,
        -100
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "55d86410-dbf3-4fe5-8452-3d2adbb21ff0",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2540,
        -100
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "7094b36e-3e59-4389-a1be-e0d8cad5e77f",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3520,
        -160
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "605226db-13f3-4067-b4dc-4cf8b4177b3f",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Set if TRUE",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set if WRONG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Personal LinkedIn Account GET",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Analyst of prospect",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Company LinkedIn Account GET",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Data": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create doc": {
      "main": [
        [
          {
            "node": "Add report to doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set if TRUE": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Data": {
      "main": [
        [
          {
            "node": "Set Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set if WRONG": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add to sheets": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Report": {
      "main": [
        [
          {
            "node": "Create doc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Company LinkedIn Account POST",
            "type": "main",
            "index": 0
          },
          {
            "node": "Perplexity Search",
            "type": "main",
            "index": 0
          },
          {
            "node": "Personal LinkedIn Account POST",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add report to doc": {
      "main": [
        [
          {
            "node": "Add to sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyst of prospect",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Perplexity Search": {
      "main": [
        [
          {
            "node": "check  perplexity research",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Report",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "check  perplexity research",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Analyst of prospect": {
      "main": [
        [
          {
            "node": "Perplexity Competitor Research",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Results Company": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Set Results Personal": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Analyst of prospect",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "check  perplexity research": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Company LinkedIn Account GET": {
      "main": [
        [
          {
            "node": "Set Results Company",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Company LinkedIn Account POST": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Personal LinkedIn Account GET": {
      "main": [
        [
          {
            "node": "Set Results Personal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Perplexity Competitor Research": {
      "main": [
        [
          {
            "node": "Generate Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Personal LinkedIn Account POST": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Get All Data",
            "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 workflow is built for professionals and teams who want to scale their B2B outreach with context-rich, personalized communication. It automates the full prospect research process — from pulling lead data and scraping LinkedIn profiles, to gathering real-time company insights…

Source: https://n8n.io/workflows/4191/ — 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

This workflow is designed for professionals and teams seeking to scale their B2B research with comprehensive company intelligence. It automates the full prospect analysis process — from extracting con

Hunter, HTTP Request, Airtop +6
AI & RAG

The best content automation template in the market is now even better—with “deep research” on time-sensitive topics\! Unlike most n8n content automation templates that are mainly for “demo purposes,”

OpenAI, HTTP Request, XML +11
AI & RAG

This n8n template demonstrates how to audit your brand’s visibility across multiple AI systems and automatically log the results to Google Sheets. It sends the same prompt to OpenAI, Perplexity, and (

Agent, Google Sheets, OpenAI Chat +4
AI & RAG

Transform a single quote into a fully-rendered cinematic short video — with voice-over, visuals, and music — then publish it directly to TikTok, Instagram Reels, and YouTube Shorts. This isn’t just au

Agent, HTTP Request, Jwt +7
AI & RAG

Disclaimer: As this workflow uses a Community node, it is available only to self-hosted installation of n8n

Google Sheets, HTTP Request, OpenAI Chat +4