Skip to main content

Extract leads from an Apollo search URL into Google Sheets

Workflow preview

Workflow preview
100%
Extract leads from an Apollo search URL into Google Sheets preview
Open on n8n.io

1. Workflow Overview

Stop manually downloading CSVs or risking account bans with sketchy UI scrapers! This workflow bridges the gap between Apollo.io's powerful search filters and your Google Sheets database using Apol...

Best for

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

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.code, n8n-nodes-base.googlesheets, n8n-nodes-base.set, n8n-nodes-base.wait, n8n-nodes-base.if, n8n-nodes-base.stickynote, n8n-nodes-base.httprequest

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Extract leads from an Apollo search URL into Google Sheets
Workflow name
Extract leads from an Apollo search URL into Google Sheets

Stop manually downloading CSVs or risking account bans with sketchy UI scrapers! This workflow bridges the gap between Apollo.io's powerful search filters and your Google Sheets database using Apollo's official REST API.

Perfect for Sales Development Reps (SDRs), Growth Marketers, and B2B Founders, this plug-and-play workflow turns a standard Apollo search URL into an automated lead-generation machine.

🚀 What This Workflow Does

  1. Smart URL Conversion: You simply paste a standard Apollo.io search URL into the workflow. A custom Code Node automatically parses all your UI filters (job titles, locations, employee count, tags) and converts them into a clean JSON payload for the Apollo API.
  2. Official API Scraping: Uses the /v1/mixed_people/search endpoint to fetch the targeted contacts safely and reliably.
  3. Smart Pagination & Rate Limiting: Automatically loops through the search results page-by-page. It includes a built-in 2-second wait timer to ensure you never hit Apollo's API rate limits.
  4. Direct Google Sheets Sync: Extracts the exact data you need (First Name, Last Name, Title, Contact/Company LinkedIn, Location, Company Details, Phone Numbers) and appends it directly to your spreadsheet.

🎯 Who is this for?

  • Sales Teams: Build targeted lead lists automatically while you sleep.
  • Agencies: Scrape and deliver customized lead lists directly into shared client spreadsheets.
  • Growth Hackers: Bypass the standard CSV export limits by leveraging API pagination.

⚙️ How It Works (Node Breakdown)

  • Set Node (Input): This is where you paste your Apollo search URL and define which page to start scraping from.
  • Code Node (Filter Builder): A production-level JavaScript parser that translates URL query parameters into API-supported arguments, automatically dropping unsupported UI-only parameters.
  • HTTP Request: Connects to the Apollo API using your personal API key.
  • Set & If Nodes (Pagination Logic): Calculates current and total pages, controlling the loop to keep fetching leads until the final page is reached.
  • Google Sheets Node: Maps the structured JSON output into clean rows and columns.

🛠️ Step-by-Step Setup Guide

1. Get Your Credentials

  • Apollo API Key: Log into your Apollo.io account, navigate to Settings > Integrations > API, and generate a new API Key.
  • Google Sheets: Ensure you have an active Google Sheets credential set up in your n8n workspace.

2. Configure the Workflow

  1. Open the Fetch Leads (Apollo) HTTP Request node. Under Headers, replace the default APOLLO_API_KEY value with your actual API key.
  2. Open the Write to Google Sheets node, select your Google Sheets credential, and point it to your specific Document and Sheet. (Make sure your sheet has headers like First Name, Last Name, Title, contact Linkedin, etc., to match the workflow mapping).
  3. Open the Apollo Search Input node and paste your target Apollo Search URL into the url field. You can also specify the start_page (default is 1).

3. Run & Automate!

Click Execute Workflow. The workflow will fetch the first page, write the leads to your sheet, pause for 2 seconds to respect rate limits, and loop until all leads are extracted.

(Note: To restrict how many pages the workflow scrapes, simply edit the total_pages assignment in the "Extract Pagination Info" node to a fixed number!)

📬 Contact Information

For Help and queries, contact

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 - When clicking ‘Execute workflow’

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

Block 2 - Extract People

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

Block 3 - Write to Google Sheets

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

Block 4 - Extract Pagination Info

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

Block 5 - Increment Page

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

Block 6 - Rate Limit Delay

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 7 - Has More Pages?

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

Block 8 - Sticky Note

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

Block 9 - Sticky Note1

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

Block 10 - Sticky Note2

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

Block 11 - Sticky Note3

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

Block 12 - Sticky Note4

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

Block 13 - Apollo Search Input

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

Block 14 - Build API Filters

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

Block 15 - Fetch Leads (Apollo)

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

3. Summary Table

Workflow Extract leads from an Apollo search URL into Google Sheets
Complexity advanced
Nodes 15
Categories Lead Generation
Author Salman Mehboob
Published 20 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/15176/15176.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 Extract leads from an Apollo search URL into Google Sheets do?

Stop manually downloading CSVs or risking account bans with sketchy UI scrapers! This workflow bridges the gap between Apollo.io's powerful search filters and your Google Sheets database using Apol...

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.