Research Business Leads with Perplexity AI & Save to Google Sheets using OpenAI
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
Uses Perplexity to research businesses (coffee shops in this example) with company name + email
Cleans and structures the output into proper JSON using OpenAI
Appends the new leads directly into Google Sheets, skipping duplicates
> Trigger: Manual — “Start Workflow”
👤 Who’s it for
Sales & marketing teams** who need to prospect local businesses
Agencies** running outreach campaigns
Freelancers** and consultants looking to automate lead research
⚙️ How it works
Set Location → define your target area (e.g., Hershey PA)
Get Current Leads → pull existing data from your Google Sheet to avoid duplicates
Research Leads → query Perplexity for 20 businesses, excluding already-scraped ones
Write JSON → OpenAI converts Perplexity output into structured Company/Email arrays
Split & Merge → align Companies with Emails row-by-row
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):
- Connect Google Sheets (OAuth2)
In n8n → Credentials → New → Google Sheets (OAuth2)
Sign in with your Google account and grant access
In the Google Sheets node, select your Spreadsheet and Worksheet
Example sheet:
https://docs.google.com/spreadsheets/d/1MnaU8hSi8PleDNVcNnyJ5CgmDYJSUTsr7X5HIwa-MLk/edit#gid=0
-
Connect Perplexity (API Key) Sign in at https://www.perplexity.ai/account
Generate an API key: https://docs.perplexity.ai/guides/getting-started
In n8n → Credentials → New → Perplexity API, paste your key -
Connect OpenAI (API Key) In n8n → Credentials → New → OpenAI API
Paste your OpenAI API key
In the OpenAI Chat Model node, select your credential and a vision-capable model (e.g., gpt-4o-mini, gpt-4o)
🔧 Requirements
A free Google account
An OpenAI API key (https://platform.openai.com)
A Perplexity API key (https://docs.perplexity.ai)
n8n self-hosted or cloud instance
🎨 How to customize
Change the Search Area in the Set Location node
Modify the Perplexity system prompt to target different business types (e.g., gyms, salons, restaurants)
Expand the Google Sheet schema to include more fields (phone, website, etc.)
📬 Contact
Need help customizing this (e.g., filtering by campaign, sending reports by email, or formatting your Google Sheet)?
📧 robert@ynteractive.com
🔗 Robert Breen
🌐 ynteractive.com
Related Templates
Use OpenRouter in n8n versions <1.78
What it is: In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot...
Task Deadline Reminders with Google Sheets, ChatGPT, and Gmail
Intro This template is for project managers, team leads, or anyone who wants to automatically remind teammates of tasks ...
🤖 Build Resilient AI Workflows with Automatic GPT and Gemini Failover Chain
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. How it works This...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments