🔓 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

LinkedIn to Google Sheets, leads and first lines ready

Lisa Granqvist Partner Workflow Automation Expert

You find a promising LinkedIn profile, copy the name, paste the URL, grab a detail for personalization… then do it again. And again. After 30 profiles, your brain is fried and your sheet is a mess.

Agency owners feel it when outreach volume spikes. A marketing consultant feels it when they’re juggling delivery and prospecting. Even a founder doing their own outbound runs into the same wall. This LinkedIn leads automation gives you a clean Google Sheet of prospects plus a tailored first line draft, ready for outreach.

Below, you’ll see how the workflow finds LinkedIn prospects through Google Search, enriches context with AI research, and writes a one-line opener you can actually use.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: LinkedIn to Google Sheets, leads and first lines ready

The Problem: LinkedIn lead sourcing and personalization doesn’t scale

Manual prospecting is slow in a way that’s hard to explain until you’ve done it for a week straight. You’re not just collecting names and links. You’re switching tabs, scanning snippets, trying to find one “human” detail, then writing a first line that doesn’t sound copied. It gets worse when you need volume, because quality drops first. And if you’re in a niche like legal, most scraping tools are either expensive, unreliable, or frankly not worth the risk.

The friction compounds. Here’s where it breaks down in real life.

  • You waste about 5 minutes per lead just moving data into the right columns.
  • Personalization turns into “Hi {FirstName}” because research takes too long.
  • Paid tools push you into Sales Navigator or questionable scraping workflows.
  • Your pipeline looks “busy,” but you can’t tell which leads are actually outreach-ready.

The Solution: Google Search to Sheets, enriched and drafted automatically

This workflow starts with a scheduled run in n8n, then uses Google Programmable Search to find LinkedIn profiles that match your query (for example, solo lawyers or small firm founders). It parses the search results into usable lead fields like name, title, profile URL, and the Google snippet, then appends that raw data into Google Sheets so nothing gets lost. Next, it enriches each lead using OpenRouter’s Sonar Pro model, pulling in extra context from the web that helps your message feel real. Finally, it generates a personalized, one-line outreach opener using GPT-4o (either via OpenAI or routed through OpenRouter) and writes that back into the same sheet. You end with an organized list that’s ready to message, not a half-finished research project.

The workflow kicks off on a schedule, runs a Google search, and paginates through results in batches so you can process a lot of leads without chaos. Each lead gets logged first, enriched second, and only then turned into a first-line draft. When it’s done, your Google Sheet contains both the lead data and the outreach line you’ll send.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you want 200 new solo-lawyer leads each week. Manually, if you spend about 5 minutes to find a profile, copy details, and write a usable first line, that’s roughly 1,000 minutes (about 16 hours). With this workflow, you schedule the run, let it collect and log leads automatically, then review the finished Sheet. Even if you spend about 1 hour skimming and tweaking the best lines, you’ve still turned a full-day task into a quick weekly review.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Programmable Search for finding LinkedIn profiles via Google.
  • Google Sheets to store leads and outreach lines.
  • OpenRouter API key (get it from your OpenRouter dashboard after funding the account).

Skill level: Beginner. You’ll mostly paste API keys, connect Google Sheets, and edit a search query and prompt.

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

How It Works

A scheduled run kicks things off. n8n starts the workflow automatically on the timing you choose, so lead generation doesn’t depend on motivation (or a spare Friday afternoon).

Google Search finds the right LinkedIn profiles. The workflow sends a request to Google Programmable Search using your query and settings, then paginates through results so it can collect a large list without manual clicking.

Results get cleaned and logged immediately. Code nodes parse the response into fields that actually matter for outreach, and the workflow appends each lead into Google Sheets before any AI work happens. If something fails later, you still keep the raw leads.

AI enrichment and first-line drafting happens per lead. The workflow loops through your newly added rows, uses OpenRouter’s research model to pull in extra context, then uses GPT-4o to write a single personalized opener and updates the corresponding row in the sheet.

You can easily modify the Google search query to target a different niche based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Scheduled Trigger

Start the workflow on a scheduled interval so the lead search runs automatically.

  1. Select Scheduled Start and set the Rule interval to your preferred schedule.
  2. Confirm the trigger connects to Initialize Index as the first action.

Step 2: Connect Google Sheets and Initialize the Search Index

Set the initial pagination index and prepare your spreadsheet for incoming leads.

  1. In Initialize Index, set currentStartIndex to 1.
  2. Open Append to Spreadsheet and set Operation to append.
  3. Map the columns in Append to Spreadsheet: Name to {{ $json.name }}, title to {{ $json.position }}, and profile_url to {{ $json.link }}.
  4. Select the target spreadsheet in Document (e.g., [YOUR_ID]) and Sheet (e.g., Sheet1).

Credential Required: Connect your Google Sheets credentials in Append to Spreadsheet.

Credential Required: Connect your Google Sheets credentials in Update Lead Sheet (configured later).

Step 3: Configure Web Search and Pagination Loop

Build the search request, parse the results, and loop through pagination.

  1. In Web Search Request, set URL to https://www.googleapis.com/customsearch/v1 and enable Send Query.
  2. Set query parameters in Web Search Request: key to [CONFIGURE_YOUR_API_KEY], cx to [CONFIGURE_YOUR_API_KEY], q to ("solo practitioner" OR "founder" OR "managing partner") lawyer "law firm" site:linkedin.com/in -government -gov -biglaw, and start to {{ $json.startIndex || 1 }}.
  3. Confirm Parse Search Results uses the provided JavaScript to extract name, position, link, and pagination fields (startIndex, hasMoreResults).
  4. Verify Parse Search Results outputs to both Append to Spreadsheet and Pagination Control in parallel.
  5. In Pagination Control, keep the JavaScript that returns continueLoop and startIndex.
  6. In Pagination Gate, set the condition to true when {{ $('Pagination Control').item.json.continueLoop }} is true.
  7. Connect Pagination Gate back to Web Search Request to continue pagination.

⚠️ Common Pitfall: If your Google Custom Search API key or CX is missing, Web Search Request will return empty results and pagination may loop without data.

Step 4: Set Up AI Research and Outreach Generation

Use the research agent and AI model to generate personalized outreach lines.

  1. In Research Insight Agent, keep Text as Name: {{ $json.name }} Title: {{ $json.title }} About: {{ $json.about }}.
  2. Review the System Message inside Research Insight Agent to ensure it aligns with your outreach goals.
  3. Confirm OpenRouter Chat Engine is connected as the language model for Research Insight Agent and set Model to perplexity/sonar-pro.
  4. In Generate Outreach Line, use the system message and ensure the user content references: {{ $('Parse Search Results').all()[ $itemIndex ].json.name }}, {{ $('Parse Search Results').all()[ $itemIndex ].json.position }}, and {{ $('Parse Search Results').all()[ $itemIndex ].json.about }}.

Credential Required: Connect your OpenRouter credentials in OpenRouter Chat Engine (credentials are applied at the parent node level, not the agent).

Credential Required: Connect your OpenAI credentials in Generate Outreach Line.

Step 5: Configure Lead Sheet Updates

Write the generated outreach line back to the spreadsheet and match on the lead’s name.

  1. Open Update Lead Sheet and set Operation to appendOrUpdate.
  2. Map name to {{ $('Parse Search Results').all()[ $itemIndex ].json.name }} and outreach message 1 to {{ $json.message.content }}.
  3. Set Matching Columns to name to update the correct lead row.
  4. Select the same Document and Sheet used in Append to Spreadsheet (e.g., [YOUR_ID] and Sheet1).

⚠️ Common Pitfall: If the name column is empty or inconsistent, Update Lead Sheet may append duplicates instead of updating existing rows.

Step 6: Test and Activate Your Workflow

Run a test to ensure the search, AI generation, and sheet updates complete successfully.

  1. Click Execute Workflow to run Scheduled Start manually.
  2. Verify that Append to Spreadsheet adds new rows with Name, title, and profile_url.
  3. Confirm Generate Outreach Line returns a short personalized line and Update Lead Sheet writes it to outreach message 1.
  4. Turn on the workflow by toggling Active to enable scheduled production runs.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Google Programmable Search credentials can expire or be restricted by project settings. If things break, check your Google Cloud API key restrictions and Custom Search API enablement first.
  • 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 LinkedIn leads automation automation?

About 20 minutes if your accounts are ready.

Do I need coding skills to automate LinkedIn leads automation?

No. You’ll connect accounts, paste API keys, and edit a search query and prompt.

Is n8n free to use for this LinkedIn leads 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 OpenRouter/OpenAI usage (most teams land around a few dollars while testing, then scale with volume).

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 leads automation workflow for a different niche than lawyers?

Yes, and it’s the main way you’ll get the best results. Change the Google search query in the Web Search Request step (for example, swap “solo lawyer” for “therapist founder” and keep the site:linkedin.com/in pattern). Then tweak the outreach prompt in the Generate Outreach Line step so it matches your tone and offer. If you want deeper personalization, adjust the Research Insight Agent instructions to prioritize signals you care about (location, practice area, recent content, and so on).

Why is my Google Sheets connection failing in this workflow?

Usually it’s an OAuth issue: the wrong Google account, revoked permissions, or the sheet wasn’t shared with the connected account. Also check that your column names match what the workflow expects (Name, Title, Profile URL, Outreach Message). If the workflow can append rows but can’t update them later, the row mapping or sheet/tab selection is often the culprit.

How many leads can this LinkedIn leads automation automation handle?

The template is designed to handle up to about 1,000 leads per day, but the practical limit depends on your Google Search quota and how much AI enrichment you run per lead. On n8n Cloud Starter you can run a healthy amount of daily executions, and higher plans handle more. If you self-host, there’s no execution cap from n8n, so your server resources and API limits become the bottleneck. In practice, most teams start with a small daily batch, validate quality, then scale up.

Is this LinkedIn leads automation automation better than using Zapier or Make?

Often, yes, because this flow uses batching, branching, and AI steps that get awkward (or pricey) in simpler tools. You also have the option to self-host n8n, which is a big deal when volume grows. Zapier or Make can still be fine for lightweight “log this lead” zaps, but they’re not as comfortable when you want pagination, enrichment, and row-by-row updates in one workflow. If you’re unsure, Talk to an automation expert and describe your volume and niche.

Once this is running, your “lead list” becomes a living system, not a recurring chore. You review, tweak, send, and move on.

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