Skip to main content

Lead generation automate on LinkedIn - personalisation, enrichment

Workflow preview

Workflow preview
100%
Lead generation automate on LinkedIn - personalisation, enrichment preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Workflow Summary This system automates LinkedIn lead generation and enrichment in six clear stages: 1. Lead Collection (via Apollo.io) Automatically pulls leads based on keywords, roles, or indu...

Best for

  • Lead Generation automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.formtrigger, n8n-nodes-base.splitout, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.googlesheetstrigger, n8n-nodes-base.stickynote, n8n-nodes-base.set, n8n-nodes-base.googlesheets, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Krupal Patel.

Original n8n.io source

1.1 Workflow description

Title
Lead generation automate on LinkedIn - personalisation, enrichment
Workflow name
Lead generation automate on LinkedIn - personalisation, enrichment

🔧 Workflow Summary

This system automates LinkedIn lead generation and enrichment in six clear stages:

1. Lead Collection (via Apollo.io)

  • Automatically pulls leads based on keywords, roles, or industries using Apollo’s API.
  • Captures name, job title, company, and LinkedIn profile URL.
  • You can kick off the workflow via form, webhook, WhatsApp, Telegram, or any other custom trigger that passes search parameters.

2. LinkedIn Username Extraction

  • Extracts usernames from LinkedIn profile URLs using a script step.
  • These usernames are required for further enrichment using RapidAPI.

3. Email Retrieval (via Apollo.io User ID)

  • Fetches verified work email using the Apollo User ID.
  • Email validity is double-checked using www.mails.so filtering out undeliverable or inactive emails by checking MX records and deliverability.

4. Profile Summary (via LinkedIn API on RapidAPI)

  • Enriches lead data by pulling bio/summary details to understand their background and expertise.

5. Activity Insights (Posts & Reposts)

  • Collects recent posts or reposts to help craft personalised messages based on what they’re currently engaging with.

6. Leads Sheet Update

  • All data is written into a Google Sheet.
  • New columns are populated dynamically without erasing existing data.

⸝

✅ Smart Retry Logic

Each workflow is equipped with a fail-safe system:

  • Tracks status per row: ✅ done, ❌ failed, ⏳ pending
  • Failed rows are automatically retried after a custom delay (e.g., 2 weeks).
  • Ensures minimal drop-offs and complete data coverage.

📊 Google Sheets Setup

Make a copy of the following:

The system appends data (like emails, bios, activity) step by step.

🔐 API Credentials Needed

1. Apollo API

  • Sign up and generate API key at [Apollo Developer Portal](Apollo Developer Portal)
  • Be sure to enable the “Master API Key” toggle so the same key works for all endpoints.

2. LinkedIn Data API (via RapidAPI)

3. Mails.so API

🛠️ Troubleshooting – LinkedIn Lead Machine

✅ Common Mistakes & Fixes

1. API Keys Not Working

  • Make sure API keys for Apollo, RapidAPI, and mails.so are correct.
  • Apollo “Master API Key” must be enabled.
  • Keys should be saved as Generic Credentials in n8n.

2. Leads Not Found

  • Check if the search query (keyword/job title) is too narrow.
  • Apollo might return empty results if the filters are incorrect.

3. LinkedIn URLs Missing or Invalid

  • Ensure Apollo is returning valid LinkedIn URLs.
  • Improper URLs will cause username extraction and enrichment steps to fail.

4. Emails Not Coming Through

  • Apollo may not have verified emails for all leads.
  • mails.so might reject invalid or expired email addresses.

5. Google Sheet Not Updating

  • Make sure the Google Sheet is shared with the right Google account (linked to n8n).
  • Check if the column names match and data isn’t blocked due to formatting.

6. Status Columns Not Changing

  • Each row must have done, failed, or pending in the status column.
  • If the status doesn’t update, the retry logic won’t trigger.

7. RapidAPI Not Returning Data

  • Double-check if username is present and valid.
  • Make sure the RapidAPI plan is active and within limits.

8. Workflow Not Running

  • Check if the trigger node (form, webhook, etc.) is connected and active.
  • Make sure you’re passing the required inputs (keyword, role, etc.).

Need Help? Contact www.KrupalPatel.com for support and custom workflow development

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 2 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 3 - OpenAI1

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 4 - Google Sheets Trigger2

Type / Role
n8n-nodes-base.googleSheetsTrigger - googleSheetsTrigger
Config choices
Version 1

Block 5 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Clean Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Add Linkedin Username

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 8 - Get Pending Username Row

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 9 - Add Email Address

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 10 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 11 - Mark Invalid Email

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 12 - Confirm Email Validity

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - Get Pending Email Statuses

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 14 - Google Sheets Trigger3

Type / Role
n8n-nodes-base.googleSheetsTrigger - googleSheetsTrigger
Config choices
Version 1

Block 15 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Get Profile Posts

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 17 - Get About Profile

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 18 - Get Pending About and Posts Rows

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 19 - Clean Profile Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 20 - Google Sheets Trigger4

Type / Role
n8n-nodes-base.googleSheetsTrigger - googleSheetsTrigger
Config choices
Version 1

Block 21 - Get Pending About and Posts Rows1

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 22 - Clean Posts Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 23 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Google Sheets Trigger5

Type / Role
n8n-nodes-base.googleSheetsTrigger - googleSheetsTrigger
Config choices
Version 1

Showing the first 24 of 55 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Lead generation automate on LinkedIn - personalisation, enrichment
Complexity advanced
Nodes 55
Categories Lead Generation
Author Krupal Patel
Published 05 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4685/4685.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Lead generation automate on LinkedIn - personalisation, enrichment do?

Workflow Summary This system automates LinkedIn lead generation and enrichment in six clear stages: 1. Lead Collection (via Apollo.io) Automatically pulls leads based on keywords, roles, or indu...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation use case.