π£ Automate business lead scraping from Apify to Google Sheets with data cleaning
β‘ 25,237 views Β· π£ Lead Generation & Enrichment
π‘ Pro Tip β HTTP Request scraping tends to break when sites update their markup. If youβre scraping a major platform, check if ScraperNode covers it β it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.
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β fromtitle - π
phoneβ cleaned number - π
addressβ from scraped info
- π’
π οΈ Requirements
-
π·οΈ Apify Account
- A valid
APIFY_TOKEN - An existing Apify task (
APIFY_TASK_ID)
- A valid
-
π Google Sheets Access
- OAuth2 credentials set up in n8n (e.g.,
"Google Sheets account 2")
- OAuth2 credentials set up in n8n (e.g.,
π¦ 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
Google Sheets, HTTP Request
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File