🔓 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

Google Sheets + LinkedIn, enriched leads ready to pitch

Lisa Granqvist Partner Workflow Automation Expert

You find a promising company, open five tabs, dig for a contact page, copy an email, then go hunting for LinkedIn context. Then you do it again. And again. The list grows, but your patience doesn’t.

This is the kind of mess that slows down growth marketers first, but agency owners and SDRs feel it too. With LinkedIn lead enrichment automation, you end up with a Google Sheet full of prospects that are actually ready to pitch, not “ready to research.”

This workflow turns one search query into enriched leads with emails, phone (when available), and LinkedIn company details. You’ll see what it automates, what results to expect, and what you need to run it reliably.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Google Sheets + LinkedIn, enriched leads ready to pitch

The Problem: Lead research is slow, inconsistent, and easy to mess up

Building a good outbound list isn’t hard because leads don’t exist. It’s hard because the information you need is scattered and messy. Google results send you into directories, dead pages, or “Contact” forms with no email. LinkedIn has the context you want (industry, size, location), but pulling it manually is a time sink and usually gets skipped when you’re in a hurry. After a few hours, your spreadsheet becomes a mix of “real leads” and “maybe later,” which means outreach stalls and pipeline gets thinner than it should.

It adds up fast. Here’s where it breaks down.

  • You spend about 10 minutes per company just figuring out if it’s worth contacting.
  • Directories and aggregator sites sneak into your results, so half your early work is thrown away.
  • Email and phone details are often buried on secondary pages, which most people never check.
  • LinkedIn context is copied by hand (if at all), so your pitch stays generic and reply rates stay low.

The Solution: A “lead gen specialist” workflow that enriches every row

This n8n workflow behaves like an autonomous research assistant. You provide one search query (for example, “Marketing agencies in Toronto”), and it pulls a clean set of leads from Google results using Serper.dev. From there it visits each company’s website, fetches the homepage HTML, and has an AI Agent decide where the real contact information is likely hiding (Contact, About, Careers, footer links, and sometimes social profiles). If a contact page exists, a second AI Agent scans that page and extracts emails and phone numbers that don’t show up on the homepage. In parallel, if a LinkedIn company profile is found, the workflow scrapes it and extracts firmographic details like employee count, industry, and headquarters location. Finally, everything gets merged into one tidy profile and appended to Google Sheets.

The workflow starts with a manual trigger in n8n, then runs a search and cleans the results before looping through leads in batches. Each lead gets two enrichment passes (website and LinkedIn when available), and the output lands as a single row per company in your spreadsheet, plus an optional email alert via Gmail.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you need 50 prospects for a niche campaign. Manually, if you spend about 10 minutes per lead bouncing between Google, the company site, LinkedIn, and your spreadsheet, that’s roughly 8 hours of work. With this workflow, you set the search query once and let it run. Because it includes a built-in delay, that 50-lead batch typically finishes in about 10–15 minutes, and your Sheet is already filled with emails, phone (when available), and LinkedIn firmographics.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets to store enriched lead rows
  • Serper.dev for Google Search API results
  • ScraperAPI to bypass bot detection on pages
  • Google Gemini or OpenAI to power the AI Agents
  • API keys (create them in each provider dashboard)

Skill level: Intermediate. You’ll connect credentials, paste API keys, and match your Sheet headers exactly.

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

How It Works

You kick it off with a search query. Start the workflow and enter a niche/location query (like “Plumbers in Chicago”) in the starting fields so the system knows what kind of companies to find.

Search results get cleaned before anything else happens. The workflow calls a search API, extracts the organic results, then normalizes them to remove directories and low-quality links so your list doesn’t get polluted.

Each lead gets researched in two directions. It fetches the company website HTML and asks an AI Agent which pages are worth checking. If it finds a “Contact” page, it scans deeper for emails and phone numbers. At the same time, if there’s a LinkedIn company profile, it pulls and interprets the key company details.

Everything merges into one clean row in Google Sheets. Website findings, contact details, and LinkedIn enrichment are combined, formatted into readable text, and appended to your spreadsheet. You can also send yourself a Gmail alert while the batch runs.

You can easily modify the search query and the fields you write to the sheet 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 manually to verify each stage of lead discovery and enrichment.

  1. Add Manual Execution Start as the trigger to run the workflow on demand.
  2. Connect Manual Execution Start to Assign Search Term to pass control to the query setup.

Step 2: Connect Search and Lead Sources

Define your target query and call the search API to generate initial lead candidates.

  1. In Assign Search Term, set search_query to Marketing and Advertising agencies in Canada (or your target market).
  2. Configure Search Engine Query with URL https://google.serper.dev/search and Method POST.
  3. Set the JSON body in Search Engine Query to ={ "q": "{{ $json.search_query }}", "num": 50 } .
  4. Credential Required: Connect your httpHeaderAuth credentials in Search Engine Query.

⚠️ Common Pitfall: The Serper API requires a valid API key header. Without it, Search Engine Query will return 401 errors.

Step 3: Set Up Lead Processing and Batching

Normalize the results and process leads in batches to control scraping load.

  1. In Extract Search Results and Standardize Lead Data, keep the JavaScript blocks as provided to parse organic results and filter junk listings.
  2. Use Iterate Through Leads to process leads in batches; keep it connected from Standardize Lead Data.
  3. Set Delay Cycle Amount to 1.5 to add throttling between scrapes.

Tip: This workflow uses multiple code nodes (7 total). Keep them as-is unless you are comfortable with JavaScript modifications.

Step 4: Configure AI Analysis and Parallel Routing

Analyze websites and contact pages with AI, then route results to LinkedIn enrichment and contact extraction in parallel.

  1. In Retrieve Website HTML, set the query parameters to include api_key [CONFIGURE_YOUR_API_KEY], url ={{ $json.website }}, and render true.
  2. In Homepage Analysis Agent, keep Text as =Analyze the following HTML and extract all contact details: {{ $json.data }}.
  3. Ensure Gemini Chat Engine is connected as the language model for Homepage Analysis Agent. Credential Required: Connect your googlePalmApi credentials in Gemini Chat Engine.
  4. Parse Agent Output outputs to both Route Contact Links and Combine Data Streams in parallel.
  5. Route Contact Links outputs to both Retrieve Contact Page and Filter LinkedIn Link in parallel.
  6. In Retrieve Contact Page, keep the query parameter url set to ={{ $json.Detail }} and replace api_key [CONFIGURE_YOUR_API_KEY] with your ScraperAPI key.
  7. Ensure Gemini Contact Engine is connected as the language model for Contact Detail Extractor. Credential Required: Connect your googlePalmApi credentials in Gemini Contact Engine.
  8. From Filter LinkedIn Link, keep the chain Derive LinkedIn IDScrape LinkedIn PageLinkedIn Data AnalystParse LinkedIn Details.
  9. Ensure Gemini LinkedIn Engine is connected as the language model for LinkedIn Data Analyst. Credential Required: Connect your googlePalmApi credentials in Gemini LinkedIn Engine.

⚠️ Common Pitfall: AI tool nodes (Homepage Analysis Agent, Contact Detail Extractor, LinkedIn Data Analyst) do not store credentials directly—add them to Gemini Chat Engine, Gemini Contact Engine, and Gemini LinkedIn Engine respectively.

Step 5: Merge Results and Prepare Output

Aggregate AI outputs and shape the data into spreadsheet-ready fields.

  1. In Aggregate Contact Results, keep the JavaScript that merges emails, phones, and summaries.
  2. Use Select Branch Output with Mode chooseBranch and useDataOfInput 2 to prefer deep-scan data when available.
  3. Configure Combine Data Streams with Mode combine, combineBy combineByPosition, and numberInputs 3.
  4. In Prepare Sheet Fields, keep the flattening logic that sets email_string, phone_string, and LinkedIn summary defaults.

Step 6: Configure Output Actions

Write results to Google Sheets and send a completion email alert.

  1. In Append Spreadsheet Row, set Document to [YOUR_ID] and Sheet to Sheet1 (gid=0).
  2. Map columns in Append Spreadsheet Row using these expressions: Phone ={{ $json.phone_string }}, Emails ={{ $json.email_string }}, Website ={{ $json.website_url }}, industry ={{ $json.industry }}, Company Name ={{ $('Iterate Through Leads').item.json.company_name }}, Linked Summary ={{ $json.linkedin_summary }}, employee count ={{ $json.employee_count }}.
  3. Credential Required: Connect your googleSheetsOAuth2Api credentials in Append Spreadsheet Row.
  4. In Dispatch Email Alert, set sendTo to your address and keep subject Extraction Completed.
  5. Credential Required: Connect your gmailOAuth2 credentials in Dispatch Email Alert.

Step 7: Test and Activate Your Workflow

Run a manual test to verify each stage produces valid output and your integrations are writing data correctly.

  1. Click Execute Workflow on Manual Execution Start to run the workflow end-to-end.
  2. Confirm Search Engine Query returns results and Extract Search Results outputs a list of leads.
  3. Verify that Homepage Analysis Agent, Contact Detail Extractor, and LinkedIn Data Analyst return valid JSON parsed by their respective code nodes.
  4. Check Google Sheets to confirm Append Spreadsheet Row adds new rows with expected values.
  5. Ensure Dispatch Email Alert sends a completion message after the batch completes.
  6. When satisfied, activate the workflow to use it for production lead research runs.
🔒

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 the n8n Credentials screen and the target Sheet sharing settings first.
  • If you’re using Wait nodes or external scraping, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • ScraperAPI can return “access denied” HTML when a target site is aggressive. When your AI output suddenly gets vague, inspect the retrieved HTML in the execution data and rotate ScraperAPI settings or headers.

Frequently Asked Questions

How long does it take to set up this LinkedIn lead enrichment automation?

About 45 minutes if you already have your API keys and the Google Sheet created.

Do I need coding skills to automate LinkedIn lead enrichment?

No. You will connect accounts, paste API keys, and copy the provided headers into your Sheet.

Is n8n free to use for this LinkedIn lead enrichment 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 Serper.dev, ScraperAPI, and your AI model usage (Gemini or OpenAI), which usually adds a small per-run cost.

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 LinkedIn lead enrichment workflow for a different niche or region?

Yes, and it’s the normal way to use it. Update the search_query in the “Assign Search Term” fields, then adjust the Google Sheets columns if you want extra fields like “City” or “Service line.” If you prefer a different AI provider, you can swap the Gemini chat model nodes for an OpenAI Chat Model node and keep the same agent prompts. You can also tighten filtering by adding more rules to the result-cleaning code so you exclude certain sites or keywords.

Why is my Google Sheets connection failing in this workflow?

Usually it’s permissions or a changed spreadsheet. Reconnect the Google Sheets credential in n8n, confirm the target file is still shared with that Google account, and make sure your header names match exactly what the workflow expects. If the workflow can’t find the right columns, the append step may error out even though the rest of the run looks fine.

How many leads can this LinkedIn lead enrichment automation handle?

Practically, it handles batches of 50 leads comfortably, and you can run more batches back-to-back.

Is this LinkedIn lead enrichment automation better than using Zapier or Make?

Often, yes, because this isn’t a simple “trigger → action” zap. You have branching logic (contact page path vs. LinkedIn enrichment path), batching with delays, and multiple AI decisions, which gets awkward and expensive fast in tools that price per task. n8n also gives you the option to self-host, so high-volume list building doesn’t turn into a surprise bill. Zapier or Make can still be fine if you only want a lightweight enrichment step after a form submission, but for multi-step research across websites and LinkedIn, n8n is usually the cleaner fit. If you want a second opinion before you build, Talk to an automation expert.

Once this is running, your spreadsheet stops being a graveyard of half-finished research. You get lead lists you can actually send outreach from.

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