Skip to main content

Enrich company records in Google Sheets with Gemini Flash and SerpAPI

Workflow preview

Workflow preview
100%
Enrich company records in Google Sheets with Gemini Flash and SerpAPI preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow manually runs a company enrichment pipeline that reads companies from Google Sheets, uses SerpAPI web search plus Google Gemini to generate structured company details, ...

Best for

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

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.manualtrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.set, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.toolserpapi

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Enrich company records in Google Sheets with Gemini Flash and SerpAPI
Workflow name
Enrich company records in Google Sheets with Gemini Flash and SerpAPI

Quick Overview

This workflow manually runs a company enrichment pipeline that reads companies from Google Sheets, uses SerpAPI web search plus Google Gemini to generate structured company details, writes the enriched data to a second Google Sheet, and marks the source rows as enriched to avoid reprocessing.

How it works

  1. Starts when you run the workflow manually.
  2. Reads all rows from a source Google Sheets worksheet and keeps only the Company Name, Website, and Enriched fields.
  3. Skips any row where Enriched is already set to Yes.
  4. For each remaining company, uses SerpAPI web search and Google Gemini (via an AI agent) to research the company and return structured JSON fields such as industry, description, target customers, headquarters, and estimated size.
  5. Normalizes the AI output by converting the target_customers array into a comma-separated string.
  6. Appends the enriched company record to an output Google Sheets worksheet.
  7. Updates the original source row in Google Sheets to set Enriched = Yes based on the Company Name.

Setup

  1. Add Google Sheets credentials and set the source spreadsheet ID and sheet name for reading companies, ensuring columns Company Name, Website, and Enriched exist.
  2. Set the output Google Sheets spreadsheet ID and sheet name for appending enriched results, ensuring columns Company Name, Website, Industry, Description, Target Customers, Headquarters, and Estimated Size exist.
  3. Add a SerpAPI credential for the web search tool.
  4. Add a Google Gemini API credential for the Gemini Flash model used by the AI agent.
  5. Confirm the “mark as enriched” update targets the same source sheet and that Company Name uniquely identifies rows for updating.

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 - 📋 Setup Instructions

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

Block 2 - 📋 Section: Read & Filter

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

Block 3 - 📋 Section: AI Enrichment

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

Block 4 - 📋 Section: Write Output

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

Block 5 - ▶ Run Enrichment

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

Block 6 - Read Source Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 7 - Extract Relevant Fields

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

Block 8 - Skip Already Enriched

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

Block 9 - AI Enrichment Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 10 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 11 - Web Search (SerpAPI)

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

Block 12 - Gemini Flash

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

Block 13 - Normalize Output Data

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

Block 14 - Append Enriched Row

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 15 - Mark as Enriched

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

3. Summary Table

Workflow Enrich company records in Google Sheets with Gemini Flash and SerpAPI
Complexity advanced
Nodes 15
Categories Lead Generation, AI Summarization
Author Cybernative Technologies
Published 10 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16223/16223.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 Enrich company records in Google Sheets with Gemini Flash and SerpAPI do?

Quick Overview This workflow manually runs a company enrichment pipeline that reads companies from Google Sheets, uses SerpAPI web search plus Google Gemini to generate structured company details, ...

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.