Enrich company records in Google Sheets with Gemini Flash and SerpAPI
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: SerpApi (Google Search). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| SerpApi (Google Search) Web Search (SerpAPI) | No direct replacement: call the SerpApi REST API with an HTTP Request tool, or use a verified community node |
Nodes used (9)
- Manual Trigger
n8n-nodes-base.manualTrigger - Google Sheets
n8n-nodes-base.googleSheets - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - SerpApi (Google Search)
@n8n/n8n-nodes-langchain.toolSerpApi - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Code
n8n-nodes-base.code
What it does
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 targetcustomers 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.