Skip to main content

Generate & enrich LinkedIn leads with Apollo.io, LinkedIn API, Mail.so & GPT-3.5

Workflow preview

Workflow preview
100%
Generate & enrich LinkedIn leads with Apollo.io, LinkedIn API, Mail.so & GPT-3.5 preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Note: Now includes an Apify alternative for Rapid API (Some users can't create new accounts on Rapid API, so I have added an alternative for you. But immediately you are able to get access to Rapid...

Best for

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

Tools used

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

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Generate & enrich LinkedIn leads with Apollo.io, LinkedIn API, Mail.so & GPT-3.5
Workflow name
Generate & enrich LinkedIn leads with Apollo.io, LinkedIn API, Mail.so & GPT-3.5

Note: Now includes an Apify alternative for Rapid API (Some users can't create new accounts on Rapid API, so I have added an alternative for you. But immediately you are able to get access to Rapid API, please use that option, it returns more detailed data). Scroll to bottom for APify setup guide

This n8n workflow automates LinkedIn lead generation, enrichment, and activity analysis using Apollo.io, RapidAPI, Google Sheets and Mail.so.

Perfect for sales teams, founders, B2B marketers, and cold outreach pros who want personalized lead insights to drive better conversion rates.


⚙️ How This Workflow Works

The workflow is broken down into several key steps, each designed to help you build and enrich a valuable list of LinkedIn leads:

1. 🔑 Lead Discovery (Keyword Search via Apollo)

  • Pulls leads using Apollo.io's API based on keywords, industries, or job titles.
  • Saves lead name, title, company, and LinkedIn URL to your Google Sheet.
  • You can replace the trigger node from the form node to a webhook, whatsapp, telegram, etc, any way for you to send over your query variables over to initiate the workflow.

2. 🧠 Username Extraction (from LinkedIn URL)

  • Extracts the LinkedIn username from profile URLs using a simple script node.
  • This is required for further enrichment via RapidAPI.

3. ✉️ Email Lookup (via Apollo User ID)

  • Uses the Apollo User ID to retrieve the lead’s verified work email.
  • Ensures high-quality leads with reliable contact info.
  • To double check that the email is currently valid, we use the mail.so api and filter out emails that fail deliverability and mx-record check. We don't wanna risk sending emails to no longer existent addresses, right?

4. 🧾 Profile Summary Enrichment (via RapidAPI)

  • Queries the LinkedIn Data API to fetch a lead’s profile summary/bio.
  • Gives you a deeper understanding of their background and expertise.

5. 📰 Recent Activity Collection (Posts & Reposts)

  • Retrieves recent posts or reposts from each lead’s profile.
  • Great for tailoring outreach with reference to what they’re currently talking about.

6. 🗂️ Leads Database Update

  • All enriched data is written to the same Google Sheet.
  • New columns are filled in without overwriting existing data.

✅ Smart Retry & Row Status Logic

Every subworkflow includes a fail-safe mechanism to ensure:

  • ✅ Each row has status columns (e.g., done, failed, pending).
  • 🕒 A scheduled retry workflow resets failed rows to pending after 2 weeks (customizable).
  • 💬 This gives failed enrichments another chance to be processed later, reducing data loss.

📋 Google Sheets Setup

Template 1: Apollo Leads Scraping & Enrichment

Template 2: Enriched Leads Database

Make a copy to your Drive and use.

Columns will be filled as each subworkflow runs (email, summary, interests, etc.)


🔐 Required API Keys

To use this workflow, you’ll need the following credentials:

🧩 Apollo.io

  • Sign up and get your key here: Apollo.io API Keys
  • ⚠️ Important: Toggle the “Master API Key” option to ON when generating your key.
    This ensures the same key can be used for all Apollo endpoints in this workflow.

🌐 RapidAPI (LinkedIn Data API)

✉️ Mail.so

> 💡 For both APIs, set up the credentials in n8n as “Generic Credential” types.
This way, you won’t need to reconfigure the headers in each node.


🛠️ Customization Options

  • Modify the Apollo filters (location, industry, seniority) to target your ideal customers.
  • Change retry interval in the scheduler (e.g., weekly instead of 2 weeks).
  • Connect the database to your email campaign tool like Mailchimp or Instantly.ai.
  • Replace the AI nodes with your desired AI agents and customize the system messages further to get desired results.

🆕 Apify Update Guide

To use this workflow, you’ll need the following credentials:

Login to Apify, then open this link; https://console.apify.com/actors/2SyF0bVxmgGr8IVCZ/

Click on integrations and scroll down to API Solutions and select "Use API endpoints". Scroll to "Run Actor synchronously and get dataset items" and copy the actor endpoint url then paste it in the placeholder inside the http node of Apify alternative flow "apify-actor-endpoint". That's it, you are set to go.


I am available for custom n8n workflows, if you like my work, please get in touch with me on email at [email protected]

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 - Google Sheets Trigger

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

Block 4 - OpenAI1

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

Block 5 - Google Sheets Trigger2

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

Block 6 - Sticky Note

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

Block 7 - Sticky Note1

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

Block 8 - Clean Data

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

Block 9 - Add Leads to Google Sheet

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

Block 10 - Add Linkedin Username

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

Block 11 - Get Pending Username Row

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

Block 12 - Sticky Note2

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

Block 13 - Add Email Address

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

Block 14 - Mark Invalid Email

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

Block 15 - Sticky Note3

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

Block 16 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 17 - Get Email from Apollo

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

Block 18 - Confirm Email Validity

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

Block 19 - Get Pending Email Statuses

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

Block 20 - Google Sheets Trigger3

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

Block 21 - Sticky Note4

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

Block 22 - Get Profile Posts

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

Block 23 - Get About Profile

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

Block 24 - Get Pending About and Posts Rows

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

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

3. Summary Table

Workflow Generate & enrich LinkedIn leads with Apollo.io, LinkedIn API, Mail.so & GPT-3.5
Complexity advanced
Nodes 66
Categories Lead Generation, AI Summarization
Author Joseph
Published 29 Apr 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3791/3791.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 Generate & enrich LinkedIn leads with Apollo.io, LinkedIn API, Mail.so & GPT-3.5 do?

Note: Now includes an Apify alternative for Rapid API (Some users can't create new accounts on Rapid API, so I have added an alternative for you. But immediately you are able to get access to Rapid...

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, AI Summarization use case.