Automate Business Lead Scraping from Apify to Google Sheets with Data Cleaning

Go to Workflow
17,005 views
Built by David Olusola David Olusola
Created on May 21, 2025

Description


๐Ÿš€ Automated Lead Scraper Workflow (Apify + n8n + Google Sheets)

๐Ÿง  What It Does

This n8n workflow automates the process of scraping leads using Apify, cleaning the extracted data, and exporting it to Google Sheetsโ€”ready for use in outreach, prospecting, or CRM pipelines.

๐Ÿ”„ Workflow Steps

โœ… Start โ€“ Manually triggers the workflow.
๐Ÿงฉ Set Variables โ€“ Stores required Apify credentials:

APIFY_TOKEN: Your Apify token.
APIFY_TASK_ID: The Apify task to run.
๐Ÿ•ธ๏ธ Run Apify Scraper โ€“ Launches the scraper and fetches the dataset.
๐Ÿงน Clean Data โ€“ Processes scraped results to:

โœ‚๏ธ Strip non-numeric characters from phone numbers.
โœ‰๏ธ Format emails (lowercase + trimmed).
๐Ÿ“Š Export to Google Sheets โ€“ Appends clean data to your spreadsheet:

๐Ÿข company name โ†’ from title
๐Ÿ“ž phone โ†’ cleaned number
๐Ÿ“ address โ†’ from scraped info

๐Ÿ› ๏ธ Requirements

๐Ÿ•ท๏ธ Apify Account

A valid APIFY_TOKEN
An existing Apify task (APIFY_TASK_ID)

๐Ÿ“— Google Sheets Access

OAuth2 credentials set up in n8n (e.g., "Google Sheets account 2")

๐Ÿšฆ How to Use

โš™๏ธ Open the Variables node and plug in your Apify credentials.
๐Ÿ“„ Confirm the Google Sheets node points to your desired spreadsheet.
โ–ถ๏ธ Run the workflow manually from the Start node.

๐Ÿ“ฅ Output

A ready-to-use sheet of cleaned lead data containing:

Company names
Phone numbers
Addresses

๐Ÿ’ผ Perfect For:

Sales teams doing outbound prospecting
Marketers building lead lists
Agencies running data aggregation tasks

Nodes Used (3)

Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest