🎣 Research business leads with Perplexity AI & save to Google Sheets using OpenAI

⚑ 810 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.

View All Scrapers

Description

Automatically research new leads in your target area, structure the results with AI, and append them into Google Sheets β€” all orchestrated in n8n.


βœ… What this template does

> Trigger: Manual β€” β€œStart Workflow”


πŸ‘€ Who’s it for


βš™οΈ How it works

  1. Set Location β†’ define your target area (e.g., Hershey PA)
  2. Get Current Leads β†’ pull existing data from your Google Sheet to avoid duplicates
  3. Research Leads β†’ query Perplexity for 20 businesses, excluding already-scraped ones
  4. Write JSON β†’ OpenAI converts Perplexity output into structured Company/Email arrays
  5. Split & Merge β†’ align Companies with Emails row-by-row
  6. Send Leads to Google Sheets β†’ append or update leads in your sheet

πŸ› οΈ Setup instructions

Follow these sticky-note setup steps (already included in the workflow):

1) Connect Google Sheets (OAuth2)

  1. In n8n β†’ Credentials β†’ New β†’ Google Sheets (OAuth2)
  2. Sign in with your Google account and grant access
  3. In the Google Sheets node, select your Spreadsheet and Worksheet

Example sheet:
https://docs.google.com/spreadsheets/d/1MnaU8hSi8PleDNVcNnyJ5CgmDYJSUTsr7X5HIwa-MLk/edit#gid=0


2) Connect Perplexity (API Key)

  1. Sign in at https://www.perplexity.ai/account
  2. Generate an API key: https://docs.perplexity.ai/guides/getting-started
  3. In n8n β†’ Credentials β†’ New β†’ Perplexity API, paste your key

3) Connect OpenAI (API Key)

  1. In n8n β†’ Credentials β†’ New β†’ OpenAI API
  2. Paste your OpenAI API key
  3. In the OpenAI Chat Model node, select your credential and a vision-capable model (e.g., gpt-4o-mini, gpt-4o)

πŸ”§ Requirements


🎨 How to customize


πŸ“¬ Contact

Need help customizing this (e.g., filtering by campaign, sending reports by email, or formatting your Google Sheet)?

πŸ”— Nodes Used

Google Sheets, AI Agent, OpenAI Chat Model, Structured Output Parser, Perplexity

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup