LinkedIn to Google Sheets, leads enriched with OpenAI
Manual LinkedIn searching is a time trap. You tweak filters, open 30 profiles, copy links into a doc, and still end up missing the one person you actually wanted to reach.
Recruiters feel it when a role is urgent. Founders doing their own outbound feel it too. Same for job seekers trying to bypass the ATS. This LinkedIn lead automation turns one plain-English prompt into a clean lead list in Google Sheets.
You’ll see how the workflow finds relevant profiles through Google search, uses OpenAI to extract useful contact details, then enriches results with email discovery so you can start outreach faster.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: LinkedIn to Google Sheets, leads enriched with OpenAI
flowchart LR
subgraph sg0["When chat message received Flow"]
direction LR
n0@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n1@{ icon: "mdi:play-circle", form: "rounded", label: "When chat message received", pos: "b", h: 48 }
n2@{ icon: "mdi:database", form: "rounded", label: "Create a new sheet", pos: "b", h: 48 }
n3@{ icon: "mdi:database", form: "rounded", label: "Add columns to new sheet", pos: "b", h: 48 }
n4["<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/>set page number for google s.."]
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/httprequest.dark.svg' width='40' height='40' /></div><br/>Google Boolean Search"]
n6@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If desired results not reached", pos: "b", h: 48 }
n7@{ icon: "mdi:database", form: "rounded", label: "Appends the results to the s..", 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/code.svg' width='40' height='40' /></div><br/>Extracts fname, lname, domai.."]
n10["<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/>Extracts all linkedin urls a.."]
n11["<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/>Adds 10 to start - Go to nex.."]
n12["<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/hunter.png' width='40' height='40' /></div><br/>Hunter"]
n13@{ icon: "mdi:robot", form: "rounded", label: "Generate a Boolean Search St..", pos: "b", h: 48 }
n14@{ icon: "mdi:robot", form: "rounded", label: "Extract Contact Details", pos: "b", h: 48 }
n15["<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/>Columns to add: linkedin_url.."]
n0 --> n5
n12 --> n7
n2 --> n15
n5 --> n10
n14 --> n9
n3 --> n4
n1 --> n13
n6 --> n0
n7 --> n11
n13 --> n2
n9 --> n12
n4 --> n6
n11 --> n6
n15 --> n3
n10 --> n14
end
subgraph sg1["Flow 2"]
direction LR
n8["<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/>Code"]
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 n1 trigger
class n13,n14 ai
class n6 decision
class n2,n3,n7 database
class n5 api
class n4,n9,n10,n11,n15,n8 code
classDef customIcon fill:none,stroke:none
class n4,n5,n9,n10,n11,n12,n15,n8 customIcon
Why This Matters: LinkedIn Research That Eats Your Week
LinkedIn is great for discovery, but painful for building a usable lead list. The busywork is relentless: you run a search, open profiles one by one, copy URLs into a spreadsheet, then try to remember why each person mattered. Meanwhile, the “context” that made a profile interesting gets lost the moment you close the tab. And honestly, the worst part is the stop-and-start mental load. You’re doing research, data entry, and light detective work all at once, which is why it takes hours instead of minutes.
It adds up fast. Here’s where it breaks down once you try doing this at any real volume.
- You end up with a messy spreadsheet of links and no real notes on fit.
- Email lookup becomes a second project, so outreach slips by a day (or a week).
- Manual copy-paste creates dumb errors like wrong names, wrong companies, or duplicate entries.
- You can’t easily repeat the process for new niches because the “method” lives in your head, not in a workflow.
What You’ll Build: A Prompt-to-Leads Pipeline in Google Sheets
This workflow acts like a lightweight LinkedIn “agent” that starts from one message you send and ends with a ready-to-use lead sheet. You drop a plain-English description of who you want to find (for example, “Product managers working on YouTube Shorts’ generative AI features”) into the chat trigger. The automation turns that into a Boolean query, runs authenticated Google searches, and pulls back LinkedIn profile URLs plus the snippets that explain why each result showed up. Then OpenAI reads that context to extract first and last names and a likely domain/company hint. Finally, Hunter.io attempts to find verified emails and the workflow appends everything into a structured Google Sheet you can actually use for outreach.
The workflow starts from your prompt in n8n chat, then iterates through Google results in batches until it hits a threshold. OpenAI extracts contact fields from the text around each profile link. Hunter.io enriches with email, and Google Sheets becomes your final “source of truth.”
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you build one targeted list per week with 30 good-fit people. Manually, it’s usually about 2 minutes to open each result and capture a profile link plus notes, then another minute to attempt an email lookup. That’s roughly 90 minutes, and it’s easy to lose the context that mattered. With this workflow, you spend about 5–10 minutes writing the prompt and checking the final Google Sheet while the searching, parsing, and enrichment runs in the background.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Sheets for storing your lead list output.
- Hunter.io to find and verify emails.
- OpenAI API key (get it from your OpenAI dashboard).
Skill level: Beginner. You’ll connect accounts, paste API keys, and run a few test prompts.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
You submit a search request via chat. The workflow is kicked off by an n8n chat trigger, so you can type what you want in natural language instead of building filters manually.
The workflow builds a Boolean query and searches Google. OpenAI generates a LinkedIn-oriented Boolean string, then an HTTP request runs authenticated Google searches to find relevant LinkedIn profile results and snippets.
Context gets converted into structured lead fields. Code steps pull out LinkedIn URLs and the text around them, then OpenAI extracts first name, last name, and domain/company hints. A loop processes results in batches so you can gather multiple pages without babysitting.
Emails are enriched and everything lands in Google Sheets. Hunter.io attempts email lookup, and the workflow appends rows into a new spreadsheet with consistent columns (first_name, last_name, domain_name, email, context) so you can start outreach immediately.
You can easily modify the search prompt style to target different roles, industries, or locations based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Chat Trigger
Start the workflow with a chat-based trigger that initiates the prospect discovery process.
- Add the Incoming Chat Trigger node to the canvas.
- Open Incoming Chat Trigger and confirm the trigger is active for chat-based inputs.
- Connect Incoming Chat Trigger to Build Boolean Search String to start the AI-driven query generation.
Step 2: Connect Google Sheets
Prepare the spreadsheet that will store your prospect results and processing data.
- Add and open Generate New Spreadsheet, Insert Sheet Columns, and Append Results to Sheet.
- Credential Required: Connect your Google Sheets credentials to Generate New Spreadsheet, Insert Sheet Columns, and Append Results to Sheet.
- Ensure Generate New Spreadsheet flows to Define Column Headers, then to Insert Sheet Columns in that exact order.
- Connect Append Results to Sheet after Hunter Email Lookup to store enriched leads.
Step 3: Set Up AI Processing Nodes
Use AI to generate the boolean query and extract contact information from results.
- Open Build Boolean Search String and Extract Contact Information.
- Credential Required: Connect your OpenAI credentials to Build Boolean Search String and Extract Contact Information.
- Confirm the flow Build Boolean Search String → Generate New Spreadsheet and Derive LinkedIn Links & Context → Extract Contact Information.
Step 4: Configure Prospect Discovery and Enrichment
Run Google searches, parse results, and enrich leads with email data.
- Open Google Boolean Query and configure its request settings for your search API or endpoint.
- If your search endpoint requires authentication, add the appropriate credentials in Google Boolean Query before running.
- Verify the sequence: Google Boolean Query → Derive LinkedIn Links & Context → Extract Contact Information → Parse Name and Domain.
- Open Hunter Email Lookup and set it to enrich the parsed name/domain data.
- Credential Required: Connect your Hunter credentials to Hunter Email Lookup.
Step 5: Add Control Logic and Iteration
Loop through search pages and stop when thresholds are met.
- Confirm Assign Search Page Index runs after Insert Sheet Columns.
- Open Check Result Threshold and define the condition to continue or stop processing.
- Ensure the loop path is: Check Result Threshold → Delay Execution Step → Google Boolean Query.
- Ensure the iteration path after writing to the sheet is: Append Results to Sheet → Increment Search Offset → Check Result Threshold.
Step 6: Test and Activate Your Workflow
Validate the end-to-end flow and make the workflow live.
- Click Execute Workflow and send a test message to Incoming Chat Trigger.
- Confirm a new spreadsheet is created by Generate New Spreadsheet and headers are inserted by Define Column Headers and Insert Sheet Columns.
- Verify that Append Results to Sheet receives enriched data after Hunter Email Lookup.
- When everything works as expected, toggle the workflow to Active for production use.
Troubleshooting Tips
- Google (via HTTP Request) credentials can expire or need specific permissions. If things break, check the connected Google account and OAuth scopes in n8n credentials first.
- If you’re using Wait nodes or external processing, timing will vary. Bump up the wait duration if downstream nodes fail because Google results or enrichment responses come back empty.
- OpenAI prompts shipped in templates are usually generic. Add your ICP rules and the exact output format you want early, or you will keep cleaning “almost right” rows in Sheets.
Quick Answers
About 10 minutes if your API keys are ready.
No. You’ll mostly connect accounts and paste in API keys, then adjust the prompt to match your ideal customer profile.
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 API costs and Hunter.io usage (most teams spend a few dollars while testing).
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.
Yes, and you should. Swap the targeting by editing the “Build Boolean Search String” OpenAI node prompt, and tighten extraction rules in the “Extract Contact Information” OpenAI node (for example, require certain titles or exclude agencies). Common customizations include changing the number of results, restricting geography, and adding extra columns like “role,” “seniority,” or “source_query.”
Usually it’s an expired Google OAuth token or the sheet was created under a different Google account than the one connected in n8n. Reconnect Google Sheets credentials in n8n, then re-run the “Generate New Spreadsheet” and “Insert Sheet Columns” steps. If rows append but columns look wrong, check the “Define Column Headers” and “Insert Sheet Columns” logic because a small mismatch can shift data into the wrong fields.
Plenty for normal outreach. On n8n Cloud you’re mainly limited by your plan’s monthly executions, and by Google/Hunter/OpenAI rate limits. Self-hosting removes the execution cap, but your server still has to handle the batch loops. In practice, most people run it per list (10–50 leads), review the sheet, then run again with a refined prompt.
Often, yes, because this is not a simple two-app sync. You’ve got looping, thresholds, conditional logic, and AI extraction steps, plus the option to self-host for high volume. Zapier and Make can do parts of it, but multi-step branching tends to get expensive and messy as you iterate. n8n also makes it easier to keep the logic in one place (query building, parsing, enrichment, and final output). If you only need “form submission to spreadsheet,” then Zapier is fine. If you want an agentic pipeline you can tweak weekly, n8n is a better fit. Talk to an automation expert if you want a recommendation for your exact use case.
Once this is running, lead research stops being a weekly chore and turns into a repeatable input-output system. The workflow handles the repetitive stuff, and you spend your time on targeting and messaging.
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.