Skip to main content

Agentic B2B lead enrichment from Google Search to Google Sheets

Workflow preview

Workflow preview
100%
Agentic B2B lead enrichment from Google Search to Google Sheets preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This is an advanced "Agentic" workflow that acts as an autonomous lead generation specialist. It goes beyond simple scraping by "thinking" about where to look for contact info. 1. Sear...

Best for

  • Lead Generation automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.httprequest, n8n-nodes-base.code, n8n-nodes-base.splitinbatches, n8n-nodes-base.wait, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.set, n8n-nodes-base.merge

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Dhruv Mali.

Original n8n.io source

1.1 Workflow description

Title
Agentic B2B lead enrichment from Google Search to Google Sheets
Workflow name
Agentic B2B lead enrichment from Google Search to Google Sheets

How it works

This is an advanced "Agentic" workflow that acts as an autonomous lead generation specialist. It goes beyond simple scraping by "thinking" about where to look for contact info.

  1. Search & Filter: It performs a Google Search for your niche (e.g., "Marketing Agencies in Toronto"), normalizing results to remove directories (Clutch, Yelp) and junk links.
  2. Homepage Analysis: It visits every lead's website and uses an AI Agent to identify key pages (Contact, About, Careers) and social profiles.
  3. Deep Scan (Branch A): If a "Contact Us" page is found, a second AI Agent visits that specific page to extract hidden emails and phone numbers.
  4. LinkedIn Enrichment (Branch B): Simultaneously, if a LinkedIn profile is found, it scrapes the profile to extract Company Size, Industry, and Headquarters location.
  5. Aggregation: Finally, it merges data from all sources, formats the arrays into readable text, and saves the complete profile to Google Sheets.

Set up steps

  1. Configure APIs:

    • Serper.dev: Required for the initial Google Search results.
    • ScraperAPI: Required to bypass bot detection when visiting company websites and LinkedIn.
    • Google Gemini (or OpenAI): Required for the AI Agents to analyze HTML.
  2. Setup Google Sheet:

    • Create a new Sheet with these exact headers in Row 1: Company Name, Linked Summary, employee count, industry, Emails, Phone, Website.
    • Connect the Google Sheets node to this file.
  3. Configure Variables:

    • In the Edit Fields node (Start), enter your search_query (e.g., "Plumbers in Chicago").
  4. Important Note:

    • This workflow uses a Loop with a 1.5s wait time to be polite to servers. A batch of 50 leads will take approximately 10-15 minutes to complete.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Serper Search

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - parse search results

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - Normalize leads

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 6 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 7 - Fetch Homepage

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 8 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 9 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - HTTP Request1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Google Gemini Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 12 - output combiner

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 14 - Merge1

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 15 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Format output

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Linked in Details

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - LinkedIN scraper

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 22 - convert scrapable link

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 23 - filter redirecting links

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 24 - Filter Linked In specific link

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Showing the first 24 of 34 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Agentic B2B lead enrichment from Google Search to Google Sheets
Complexity advanced
Nodes 34
Categories Lead Generation, AI Summarization
Author Dhruv Mali
Published 23 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8851/8851.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Agentic B2B lead enrichment from Google Search to Google Sheets do?

How it works This is an advanced "Agentic" workflow that acts as an autonomous lead generation specialist. It goes beyond simple scraping by "thinking" about where to look for contact info. 1. Sear...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation, AI Summarization use case.