Automate lead generation from Google Search & Maps to Google Sheets
This n8n template from Intuz provides a complete solution to automate on-demand lead generation.
It acts as a powerful scraping agent that takes a simple chat query, scours both Google Search and Google Maps for relevant businesses, scrapes their websites for contact details, and compiles an enriched lead list directly in Google Sheets.
Who's this workflow for?
- Sales Development Representatives (SDRs)
- Local Marketing Agencies
- Business Development Teams
- Freelancers & Consultants
- Market Researchers
How it works
1. Start with a Chat Query: The user initiates the workflow by typing a search query (e.g., "dentists in New York") into a chat interface.
2. Multi-Source Search: The workflow queries both the Google Custom Search API (for web results across multiple pages) and scrapes Google Maps (for local businesses) to gather a broad list of potential leads.
3. Deep Dive Website Scraping: For each unique business website found, the workflow visits the URL to scrape the raw HTML content of the page.
4. Intelligent Contact Extraction: Using custom code, it then parses the scraped website content to find and extract valuable contact information like email addresses, phone numbers, and social media links.
5. Deduplicate and Log to Sheets: Before saving, the workflow checks your Google Sheet to ensure the lead doesn't already exist. All unique, newly enriched leads are then appended as clean rows to your sheet, along with the original search query for tracking.
Key Requirements to Use This Template
1. n8n Instance & Required Nodes:
- An active n8n account (Cloud or self-hosted).
- This workflow uses the official n8n LangChain integration (@n8n/n8n-nodes-langchain) for the chat trigger. If you are using a self-hosted version of n8n, please ensure this package is installed.
2. Google Custom Search API:
- A Google Cloud Project with the "Custom Search API" enabled.
- You will need an API Key for this service.
- You must also create a Programmable Search Engine and get its Search engine ID (cx). This tells Google what to search (e.g., the whole web).
3. Google Sheets Account:
- A Google account and a pre-made Google Sheet with columns for Business Name, Primary Email, Contact Number, URL, Description, Socials, and Search Query.
Setup Instructions
1. Configure the Chat Trigger:
- In the "When chat message received" node, you can find the Direct URL or Embed code to use the chat interface.
Set Up Google Custom Search API (Crucial Step):
- Go to the "Custom Google Search API" (HTTP Request) node.
- Under "Query Parameters", you must replace the placeholder values for key (with your API Key) and cx (with your Search Engine ID).
3. Configure Google Sheets:
- In all Google Sheets nodes (Append row in sheet, Get row(s) in sheet, etc.), connect your Google Sheets credentials.
- Select your target spreadsheet (Document ID) and the specific sheet (Sheet Name) where you want to store the leads.
4. Activate the Workflow:
- Save the workflow and toggle the "Active" switch to ON.
- Open the chat URL and enter a search query to start generating leads.
Connect with us
- Website: https://www.intuz.com/services
- Email: getstarted@intuz.com
- LinkedIn:
- https://www.linkedin.com/company/intuz
- Get Started: https://n8n.partnerlinks.io/intuz
For Custom Workflow Automation
Click here- Get Started
Automate Lead Generation from Google Search & Maps to Google Sheets
This n8n workflow automates the process of extracting lead information from Google Search and Google Maps and then saving it into a Google Sheet. It's designed to streamline lead generation efforts by programmatically searching for businesses and capturing relevant details.
What it does
- Triggers on Chat Message: The workflow starts when a chat message is received, likely containing a search query for businesses.
- Performs HTTP Request: It makes an HTTP request, presumably to a service that scrapes Google Search and Google Maps based on the input query.
- Processes Search Results: The results from the HTTP request are then processed:
- Filters Data: It filters the received data, likely to isolate relevant lead information.
- Removes Duplicates: Duplicate entries are removed to ensure unique lead data.
- Loops Over Items: It iterates through each unique lead item.
- Applies Logic (If/Else): For each item, it applies conditional logic (an "If" statement), potentially to categorize or further refine the lead based on certain criteria.
- Edits Fields: It modifies or sets specific fields for each lead, preparing the data for storage.
- Adds a Wait: A "Wait" node is included, which might be used to introduce a delay between processing items, possibly to respect API rate limits or to space out operations.
- Merges Data: After individual processing, the data from different branches of the "If" node is merged back together.
- Writes to Google Sheets: Finally, the processed and merged lead data is appended to a specified Google Sheet.
Prerequisites/Requirements
- n8n Instance: A running n8n instance.
- Google Sheets Account: A Google account with access to Google Sheets.
- Google Sheets Credential: An n8n credential for Google Sheets (OAuth or Service Account).
- Chat Service Integration: A chat service integrated with n8n (e.g., Telegram, Slack, Mattermost) to trigger the workflow via
Chat Triggernode. - Web Scraping Service/API: Access to a web scraping service or API that can query Google Search and Google Maps and return structured data (this is implied by the
HTTP Requestnode). You will need to configure theHTTP Requestnode with the appropriate URL, headers, and authentication for your chosen service.
Setup/Usage
- Import the workflow: Import the provided JSON into your n8n instance.
- Configure Credentials:
- Google Sheets: Set up your Google Sheets credential in n8n.
- HTTP Request: Configure the
HTTP Requestnode with the details of your Google Search/Maps scraping API. This will include the API endpoint, any necessary API keys or authentication headers, and the query parameters to pass the search term.
- Configure Chat Trigger: Ensure your
Chat Triggernode is correctly set up to listen for messages from your chosen chat service. - Customize Logic (Optional):
- Adjust the
Filternode to refine which data points are kept from the scraping results. - Modify the
Ifnode's conditions to implement specific lead qualification logic. - Update the
Edit Fields (Set)node to map the scraped data to the desired columns in your Google Sheet.
- Adjust the
- Specify Google Sheet: In the
Google Sheetsnode, configure the Spreadsheet ID and Sheet Name where you want the leads to be appended. - Activate the workflow: Once configured, activate the workflow.
- Trigger the workflow: Send a chat message with your desired search query to the configured chat service to initiate the lead generation process.
Related Templates
Track competitor SEO keywords with Decodo + GPT-4.1-mini + Google Sheets
This workflow automates competitor keyword research using OpenAI LLM and Decodo for intelligent web scraping. Who this is for SEO specialists, content strategists, and growth marketers who want to automate keyword research and competitive intelligence. Marketing analysts managing multiple clients or websites who need consistent SEO tracking without manual data pulls. Agencies or automation engineers using Google Sheets as an SEO data dashboard for keyword monitoring and reporting. What problem this workflow solves Tracking competitor keywords manually is slow and inconsistent. Most SEO tools provide limited API access or lack contextual keyword analysis. This workflow solves that by: Automatically scraping any competitor’s webpage with Decodo. Using OpenAI GPT-4.1-mini to interpret keyword intent, density, and semantic focus. Storing structured keyword insights directly in Google Sheets for ongoing tracking and trend analysis. What this workflow does Trigger — Manually start the workflow or schedule it to run periodically. Input Setup — Define the website URL and target country (e.g., https://dev.to, france). Data Scraping (Decodo) — Fetch competitor web content and metadata. Keyword Analysis (OpenAI GPT-4.1-mini) Extract primary and secondary keywords. Identify focus topics and semantic entities. Generate a keyword density summary and SEO strength score. Recommend optimization and internal linking opportunities. Data Structuring — Clean and convert GPT output into JSON format. Data Storage (Google Sheets) — Append structured keyword data to a Google Sheet for long-term tracking. Setup Prerequisites If you are new to Decode, please signup on this link visit.decodo.com n8n account with workflow editor access Decodo API credentials OpenAI API key Google Sheets account connected via OAuth2 Make sure to install the Decodo Community node. Create a Google Sheet Add columns for: primarykeywords, seostrengthscore, keyworddensity_summary, etc. Share with your n8n Google account. Connect Credentials Add credentials for: Decodo API credentials - You need to register, login and obtain the Basic Authentication Token via Decodo Dashboard OpenAI API (for GPT-4o-mini) Google Sheets OAuth2 Configure Input Fields Edit the “Set Input Fields” node to set your target site and region. Run the Workflow Click Execute Workflow in n8n. View structured results in your connected Google Sheet. How to customize this workflow Track Multiple Competitors → Use a Google Sheet or CSV list of URLs; loop through them using the Split In Batches node. Add Language Detection → Add a Gemini or GPT node before keyword analysis to detect content language and adjust prompts. Enhance the SEO Report → Expand the GPT prompt to include backlink insights, metadata optimization, or readability checks. Integrate Visualization → Connect your Google Sheet to Looker Studio for SEO performance dashboards. Schedule Auto-Runs → Use the Cron Node to run weekly or monthly for competitor keyword refreshes. Summary This workflow automates competitor keyword research using: Decodo for intelligent web scraping OpenAI GPT-4.1-mini for keyword and SEO analysis Google Sheets for live tracking and reporting It’s a complete AI-powered SEO intelligence pipeline ideal for teams that want actionable insights on keyword gaps, optimization opportunities, and content focus trends, without relying on expensive SEO SaaS tools.
Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax
Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions
Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review
This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.