SerpAPI to Google Sheets, LinkedIn leads logged
Prospecting shouldn’t feel like playing whack-a-mole with browser tabs. But if you’re searching LinkedIn profiles via Google, you already know the routine: search, open, copy the URL, paste it somewhere, then realize you just captured the same person twice.
This SerpAPI Sheets leads setup hits SDRs first, honestly. Recruiters doing niche searches feel it too, and so do consultants building lists for clients. The outcome is simple: a clean Google Sheet of public LinkedIn profile URLs (with names and keywords) without the messy copy-paste cycle.
You’ll see how the workflow pulls results across multiple Google pages, extracts the useful bits, and logs everything in a spreadsheet you can actually work from.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: SerpAPI to Google Sheets, LinkedIn leads logged
flowchart LR
subgraph sg0["On form submission Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>On form submission"]
n1@{ icon: "mdi:swap-vertical", form: "rounded", label: "Format Keywords", pos: "b", h: 48 }
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Build Page List"]
n3@{ icon: "mdi:web", form: "rounded", label: "SerpAPI Search", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check how many results are r..", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>No profiles found"]
n6@{ icon: "mdi:swap-vertical", form: "rounded", label: "Split Out", pos: "b", h: 48 }
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Get Full Name to property of.."]
n8@{ icon: "mdi:database", form: "rounded", label: "Append profile in sheet", pos: "b", h: 48 }
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Form Response"]
n10@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n6 --> n7
n3 --> n4
n2 --> n10
n1 --> n2
n10 --> n9
n10 --> n3
n0 --> n1
n8 --> n10
n4 --> n5
n4 --> n6
n7 --> n8
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n4 decision
class n8 database
class n3 api
class n2,n7 code
classDef customIcon fill:none,stroke:none
class n0,n2,n5,n7,n9 customIcon
The Challenge: Turning search results into a usable lead list
Google is often the fastest way to find public LinkedIn profiles for a specific niche, but the results are not a list you can use. They’re scattered across pages, titles are inconsistent, and you end up doing “data entry” while pretending it’s research. Even when you’re careful, duplicates sneak in because the same profile shows up under slightly different searches, or because you’re working from memory. Then comes the follow-up pain: you still need a spreadsheet to sort, tag, dedupe, and hand off for outreach.
It adds up fast. Here’s where it breaks down in real life.
- You lose about 1–2 hours per list just copying URLs, names, and context into a sheet.
- Pagination is easy to forget, so you stop at page one and miss most of the results.
- Profile names get messy because titles include extra text like separators and company names.
- Teams end up with “almost the same” lists, which makes deduping and outreach tracking a headache.
The Fix: SerpAPI pulls LinkedIn profiles and logs them to Sheets
This workflow gives you a simple form where you enter a few keywords (comma-separated) and choose how many Google pages you want to fetch. From there, it formats your keywords into a cleaner Google query, generates the correct pagination offsets (0, 10, 20, and so on), and runs each search page through SerpAPI. Each result is unpacked into individual LinkedIn profile items, then a small cleanup step extracts the person’s full name from the search title. Finally, every profile gets appended to your Google Sheet with the timestamp and the original keywords, so you can filter later and keep the “why did we save this?” context.
The workflow starts with a form submission (“LinkedIn Search”). It loops through the pages you requested, pulls Google results via SerpAPI, and writes each LinkedIn profile URL to Google Sheets. When it’s done, you get a confirmation message telling you to check the sheet.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you run a niche search and pull 3 Google pages (about 30 results). Manually, you’ll usually spend maybe 2 minutes per result opening tabs, grabbing the LinkedIn URL, and pasting names into a sheet, which is about an hour. With this automation, you submit the form in about a minute, let the workflow fetch page 1–3 in the background, and you’re done once the Google Sheet is filled. The work shifts from “collecting” to “deciding who’s worth contacting.”
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- SerpAPI to fetch Google search results reliably.
- Google Sheets to store and share the lead list.
- SerpAPI API key (get it from your SerpAPI dashboard).
Skill level: Intermediate. You’ll connect credentials, pick a spreadsheet, and (if on n8n Cloud) swap SerpAPI node usage for an HTTP Request.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A simple form kicks it off. You submit keywords like “python, fintech, warsaw” and choose how many Google pages to fetch. That’s it.
Your keywords get turned into a better search query. The workflow wraps each keyword in parentheses and quotes to improve relevance in Google, then prepares a page queue with the right offsets (0, 10, 20…).
SerpAPI pulls results page-by-page. A loop runs each queued page through the SerpAPI search. If SerpAPI returns no results, the workflow responds immediately so you’re not staring at an empty sheet wondering what happened.
Each result is cleaned and logged. The workflow splits results into individual items, extracts a clean full name from the title text, and appends Date, Profile URL, Full name, and Keywords to your Google Sheet.
You can easily modify the search location to target a different city or country based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Form Trigger
This workflow starts when a user submits a form. You will define the form fields and response mode in Form Submit Trigger.
- Add or open Form Submit Trigger.
- Set Form Title to
LinkedIn Search. - In Form Fields, create two fields: Keywords (comma separated) and Pages to fetch (number).
- Set Response Mode to
lastNodeso the final form response node returns the result.
Step 2: Connect SerpAPI and Google Sheets
This workflow queries SerpAPI and appends results to Google Sheets. Connect both credentials before running.
- Open SerpAPI Lookup and select the SerpAPI credential.
- Credential Required: Connect your serpApi credentials.
- Open Append to Sheet and select the Google Sheets credential.
- Credential Required: Connect your googleSheetsOAuth2Api credentials.
Step 3: Set Up Keyword Processing
Next, format user keywords and build the page queue for SerpAPI queries.
- Open Keyword Formatter and ensure the keywords value expression is set to
{{ (() => { const keywords = $json["Keywords (comma separated)"] .split(',') .map(k => k.trim()) .filter(Boolean); return '("' + keywords.join('") ("') + '")'; })() }}. - Open Generate Page Queue and confirm the JavaScript Code uses the form values and computed keywords (as provided in the node).
- Verify Generate Page Queue references Form Submit Trigger and Keyword Formatter for
Pages to fetch,Keywords (comma separated), andsubmittedAt.
Step 4: Configure Search, Routing, and Result Parsing
This section runs SerpAPI queries, checks result count, and expands each organic result into individual items.
- In Batch Iterator, keep default settings to process each page item from Generate Page Queue.
- In SerpAPI Lookup, set q to
=site:pl.linkedin.com/in/ {{$json.keywordsGrouped}}and Location toWarsaw,Masovian Voivodeship,Poland. - In SerpAPI Lookup, ensure Additional Fields → start is
={{$json.start}}so pagination works. - In Evaluate Result Count, keep the two rules:
{{ parseInt($json.search_information.total_results) }}equals0for empty lists and{{ $json.search_information.total_results }}greater than0for non-empty lists. - In Expand Search Results, set Field To Split Out to
organic_results. - In Extract Full Name, keep the JavaScript that splits the
titlefield and stores it asfullName.
Step 5: Configure Output and Form Responses
Send results to Google Sheets and respond to the form submitter based on whether results were found.
- In Append to Sheet, set Operation to
append. - Set Document to the spreadsheet ID
[YOUR_ID]and Sheet togid=0(Sheet1). - Map columns in Append to Sheet: Date →
{{ $('Form Submit Trigger').item.json.submittedAt }}, Profile →{{ $json.link }}, Keywords →{{ $('Form Submit Trigger').item.json['Keywords (comma separated)'] }}, Full name →{{ $json.fullName }}. - In No Results Reply, confirm Completion Title is
Responseand Completion Message isNo profiles found based on params.. - In Return Form Response, set Completion Title to
Responseand Completion Message toCheck linked file.
Step 6: Test and Activate Your Workflow
Run a manual test to verify the form flow, SerpAPI results, and Google Sheets output before enabling the workflow.
- Click Execute Workflow and submit the form in Form Submit Trigger with sample keywords and pages.
- Confirm that SerpAPI Lookup returns results and Append to Sheet writes rows to your spreadsheet.
- If no results are found, verify that No Results Reply sends the completion message.
- When everything looks correct, switch the workflow to Active for production use.
Watch Out For
- SerpAPI credentials can expire or have plan limits. If things break, check your SerpAPI dashboard usage and the API key stored in n8n Credentials 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.
- Google Sheets permissions cause sneaky failures. If the sheet isn’t updating, confirm the OAuth account has edit access to that exact spreadsheet and tab.
Common Questions
Usually about 30 minutes once your SerpAPI key and Google Sheet are ready.
Yes, but plan for one technical pass if you’re on n8n Cloud and need to replace the community SerpAPI node with an HTTP Request. After that, using it is just filling out the form.
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 SerpAPI usage costs based on how many result pages you fetch.
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.
You can swap the fixed location in the SerpAPI Lookup step to match your target region, or change the query from site:pl.linkedin.com/in/ to site:linkedin.com/in/ for broader coverage. If you want more than name + URL, map fields like the result snippet into Google Sheets by editing what the “Append to Sheet” step writes. For deduping, add a Google Sheets read/check before the append and only write new URLs when the “If” condition says they’re not already present.
Most of the time it’s an invalid or expired API key stored in n8n Credentials. It can also be a plan limit or rate limiting if you’re fetching too many pages too quickly, so check your SerpAPI dashboard and slow the loop down with a short wait if needed.
It scales to the limits of your n8n plan and SerpAPI quota. Self-hosted n8n has no execution cap, and this workflow typically handles a few pages (about 30–50 results) per run comfortably; if you push far beyond that, add a small delay between page fetches to keep things stable.
Often, yes, if you care about pagination and data cleanup. Zapier and Make can do HTTP calls, but looping through pages, splitting arrays into items, and running custom extraction logic tends to get fiddly, and it can get expensive as tasks climb. n8n is simply more flexible for “search → parse → write rows” workflows, and self-hosting is a big deal if you run lots of prospecting jobs. That said, if you only need a one-off 2-step “call API then append row,” Zapier or Make can be quicker to set up. Talk to an automation expert if you want a quick recommendation for your exact volume.
Once this is in place, lead collection becomes a background task instead of a daily time sink. You get a sheet that’s ready for outreach, enrichment, or handoff, and you stop rebuilding the same list from scratch.
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.