🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Perplexity to Google Sheets, cleaner lead lists

Lisa Granqvist Partner Workflow Automation Expert

Your lead sheet starts clean. Then you do “just a quick scrape,” paste results from a few sources, and suddenly you’re staring at duplicates, missing emails, and rows that don’t match. It’s messy, and it slows everything down.

Sales reps feel it when follow-ups bounce. A marketing manager building a local campaign feels it when lists need “one more pass.” And if you run an agency, you’ve probably rebuilt the same spreadsheet logic for three different clients. This Perplexity Sheets automation keeps your lead list usable without babysitting it.

You’ll see how the workflow finds local businesses, uses AI to turn messy text into structured rows, and appends only new leads into Google Sheets (so your outreach can actually move).

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Perplexity to Google Sheets, cleaner lead lists

The Problem: Lead lists get dirty fast

Local prospecting sounds simple until you do it at scale. You search for “coffee shops in Hershey PA,” copy results into a sheet, and realize half the entries have no email. Then you find emails elsewhere, paste them in, and now the company name doesn’t match the email row anymore. After that comes deduping. Not just once, but every time you refresh the list. The real cost isn’t only time (though it’s usually a few hours a week). It’s the mental overhead and the quiet errors that wreck deliverability and make outreach feel random.

The friction compounds. Here’s where it usually breaks down.

  • You end up copying raw results that look readable, but don’t turn into clean rows without manual editing.
  • Duplicates creep in because you’re pulling from the same geography and keywords over and over.
  • Company names and emails get misaligned, which leads to embarrassing personalization mistakes.
  • Someone has to “clean the sheet” before outreach can even start.

The Solution: Perplexity research + OpenAI cleanup → Google Sheets

This n8n workflow automates the boring middle of lead generation: the part between “find businesses” and “start outreach.” You kick it off manually when you want fresh leads. First, it sets your target area (for example, Hershey PA), then pulls your current Google Sheet so it knows what you already have. Next, it queries Perplexity for a batch of local businesses while excluding anything already in your sheet. Perplexity’s response is useful, but it’s still unstructured text. That’s where OpenAI steps in, converting the output into consistent JSON arrays (company names and emails) that a spreadsheet can actually use. Finally, the workflow splits, lines up, merges each company with its email, and appends the clean rows to Google Sheets.

The workflow starts with a location you define and a quick “read” of your existing sheet. It then does research and cleanup in one pass, and ends by writing only the new, structured rows back into Google Sheets. No copy-paste, no “which email belongs to which business?” guessing.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you build a local list every Monday: 20 businesses, with a name and an email for each. Manually, research plus cleanup is often about 10 minutes per lead (find, verify, paste, format), which is roughly 3 hours for a batch of 20. With this workflow, you start the run, let Perplexity return the results, and OpenAI structures them for your sheet. You’ll usually spend a few minutes reviewing the new rows, not rebuilding them.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets to store and dedupe lead rows
  • Perplexity to research local businesses and emails
  • OpenAI API key (get it from the OpenAI platform dashboard)

Skill level: Beginner. You will connect credentials, choose your spreadsheet, and edit the target location and prompt text.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

You trigger it when you want new leads. This workflow uses a manual start, which is perfect for weekly prospecting runs or “I need 20 more businesses in this city” moments.

Your target area gets set. A simple field defines the location (like Hershey PA), so the rest of the workflow stays consistent even when you switch towns, counties, or regions.

Your existing sheet is used as a guardrail. n8n pulls your current Google Sheets leads, aggregates them, and prepares a “do not include” context so Perplexity doesn’t return the same businesses again.

Perplexity researches, then OpenAI structures. Perplexity returns a text-heavy answer, then the OpenAI Chat Model/AI Agent converts it into clean JSON that can be split into a company list and an email list. Those lists get merged into row-ready records.

Clean rows land in Google Sheets. The final Google Sheets node updates or appends new leads, so your list grows without turning into a duplicate swamp.

You can easily modify the search area to target a different city, or adjust the fields to capture phone numbers and websites based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Manual Trigger

Start the workflow with a manual run so you can test the lead research process end-to-end.

  1. Add and keep Manual Execution Start as the trigger node.
  2. Leave Manual Execution Start with default settings (no parameters required).
  3. (Optional) Keep Flowpast Branding as a visual note for documentation only.

Step 2: Connect Google Sheets

Configure the input and output Sheets nodes that load existing leads and update your spreadsheet.

  1. Open Retrieve Existing Leads and set the Document to your Google Sheet (example value: [YOUR_ID]) and Sheet to Sheet1 (gid=0).
  2. In Retrieve Existing Leads, add a filter for Area with Lookup Value set to {{ $json.Area }}.
  3. Credential Required: Connect your googleSheetsOAuth2Api credentials in Retrieve Existing Leads.
  4. Open Update Leads Spreadsheet and set Operation to appendOrUpdate.
  5. In Update Leads SpreadsheetColumns, map fields to: Area = {{ $('Map Text Fields').item.json['Search Area'] }}, Email = {{ $json['output.Email'] }}, Company = {{ $json['output.Company'] }}.
  6. Set Matching Columns to Email to avoid duplicates by email.
  7. Credential Required: Connect your googleSheetsOAuth2Api credentials in Update Leads Spreadsheet.

Step 3: Set Up Lead Context and Aggregation

Define the target area and prepare existing lead data before sending it to AI research.

  1. Open Assign Area Value and set Area to Hershey PA (change this to your desired search area).
  2. Confirm Retrieve Existing Leads connects to Aggregate Items to consolidate existing records.
  3. Open Aggregate Items and keep Aggregate set to aggregateAllItemData.
  4. Open Map Text Fields and set Search Area to {{ $('Assign Area Value').item.json.Area }} and data to {{ $json.data }}.

Step 4: Set Up AI Research and Structured Parsing

Run the research query and convert the AI response into a structured JSON format.

  1. Open Discover New Leads and confirm Model is set to sonar with Simplify enabled.
  2. In Discover New LeadsMessages, keep the system prompt and set the user content to Area: {{ $json['Search Area'] }} Already Scraped: {{ $json.data }}.
  3. Credential Required: Connect your perplexityApi credentials in Discover New Leads.
  4. Open Generate JSON Format and set Text to {{ $json.message }}.
  5. In Generate JSON FormatSystem Message, keep the JSON schema instructions to output { "Company": [...], "Email": [...] }.
  6. Ensure OpenAI Chat Engine is connected as the language model for Generate JSON Format. Credential Required: Connect your openAiApi credentials in OpenAI Chat Engine.
  7. Ensure Structured Output Reader is connected as the output parser for Generate JSON Format. Add parser credentials to OpenAI Chat Engine if required (do not add them to Structured Output Reader).

Tip: If the AI returns malformed JSON, tighten the system message in Generate JSON Format and test with a smaller output set.

Step 5: Split, Merge, and Prepare Records for Update

Break the JSON arrays into individual rows and combine email/company pairs for spreadsheet updates.

  1. Open Split Company List and set Field to Split Out to output.Company.
  2. Open Split Email List and set Field to Split Out to output.Email.
  3. Generate JSON Format outputs to both Split Company List and Split Email List in parallel.
  4. Open Merge Records and set Mode to combine with Combine By set to combineByPosition.

⚠️ Common Pitfall: If the number of companies and emails don’t match, Merge Records will misalign data. Ensure the JSON lists from Generate JSON Format are the same length.

Step 6: Test and Activate Your Workflow

Validate the workflow manually, then activate it for repeated use.

  1. Click Execute Workflow to run Manual Execution Start and follow the data through each node.
  2. Verify that Update Leads Spreadsheet appends or updates rows with Area, Email, and Company values.
  3. If results are missing, confirm the Retrieve Existing Leads filter is using {{ $json.Area }} and that Map Text Fields outputs a valid Search Area.
  4. Once verified, toggle the workflow to Active for production use.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Google Sheets credentials can expire or need specific permissions. If things break, check n8n → Credentials and confirm the connected Google account still has access to the spreadsheet.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Frequently Asked Questions

How long does it take to set up this Perplexity Sheets automation automation?

About 30 minutes if your accounts are ready.

Do I need coding skills to automate lead list cleaning from Perplexity into Google Sheets?

No. You’ll mostly connect credentials and edit a couple of text fields (location and the research prompt).

Is n8n free to use for this Perplexity Sheets automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI and Perplexity API usage, which typically costs a few dollars for small weekly batches.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this Perplexity Sheets automation automation for pulling phone numbers and websites too?

Yes, but you’ll want to do it in two places. Update the Perplexity prompt in the “Discover New Leads” step so it returns the extra fields, then adjust the OpenAI “Generate JSON Format” step to output those fields in the structured JSON. After that, add new columns to your Google Sheet and map them in the final Google Sheets write node. It’s straightforward once you see one successful run.

Why is my Google Sheets connection failing in this workflow?

Usually it’s expired OAuth access or the Google account lost permission to the spreadsheet. Reconnect the Google Sheets (OAuth2) credential in n8n, then open the Google Sheets nodes and re-select the correct spreadsheet and worksheet. If it still fails, check that the sheet wasn’t moved to a different Drive or locked down by an admin.

How many leads can this Perplexity Sheets automation automation handle?

Practically, it’s fine for dozens to a few hundred leads per run.

Is this Perplexity Sheets automation automation better than using Zapier or Make?

For this exact job, n8n is usually the more comfortable fit because the workflow has branching, merging, and structured parsing that gets awkward (and pricey) in simpler automation tools. The AI Agent and structured output approach is also easier to control in n8n, which matters when you care about clean rows. Zapier or Make can still work if you keep it basic, but you’ll often end up with more “glue steps” and manual cleanup. Frankly, that defeats the point. Talk to an automation expert if you want help choosing.

Clean lead lists are an unfair advantage, honestly. Set this up once, run it when you need new prospects, and spend your time on outreach that actually gets replies.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal