Automated Personalized Cold Outreach from Google Maps Data using AI - n8n Workflow

Use this powerful n8n workflow to automate B2B lead generation. Scrape Google Maps via Apify, analyze websites, and use the OpenAI n8n node to generate personalized sales emails, saving all results to Google Sheets. Find more advanced n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Sales Representatives aiming to automate high-volume lead sourcing and initial outreach drafting.

  • Marketing Agencies specializing in scalable local business outreach programs.

  • Freelancers or consultants selling specialized B2B services (e.g., reservation systems, SEO, web design) to brick-and-mortar stores.

  • Users searching for advanced n8n templates that integrate data scraping, AI, and CRM functions.

Overview

This specialized n8n workflow solves the tedious, resource-intensive problem of manual lead research and cold email personalization. By utilizing the Apify n8n node, the process starts by automatically pulling qualified local business leads from Google Maps based on configured criteria (e.g., location and business type). For each lead, the n8n workflow analyzes the business's website content via an HTTP Request n8n node. It then passes this highly relevant contextual data to the OpenAI n8n node, which drafts a unique, highly personalized sales pitch. This pitch specifically connects your defined service's Unique Selling Proposition (USP) directly to the lead's profile and scraped needs. Finally, all the structured data, including the AI-generated email draft, is cataloged reliably in Google Sheets. This robust n8n workflow template significantly accelerates B2B outreach efforts, ensuring maximum personalization and efficiency.

How it Works

The entire automated process starts with a manual n8n trigger, following these key steps:


  1. Initiation and Configuration: The n8n trigger starts the flow. A subsequent Set n8n node, titled 'Workflow Configuration,' defines critical parameters. These include the target geographical area and search query (e.g., '渋谷 カフェ'), the maximum number of leads (maxPlaces), and specific details about the service being sold, such as serviceName and serviceStrength.

  2. Lead Scraping (Apify): An Apify n8n node executes the Google Maps Scraper actor using the configuration data, retrieving detailed business information (name, address, website, phone).

  3. Looping and Filtering: The Split in Batches n8n node, 'Loop Over Items,' iterates through each lead provided by Apify. An IF n8n node checks if a valid website URL exists for the business. Only leads with a website proceed down the main path of the n8n workflow.

  4. Website Content Retrieval & Extraction: If a website exists, an HTTP Request n8n node fetches the raw HTML content. A subsequent Code n8n node cleans the HTML by removing scripts and styles and extracts the first 2000 characters of essential plain text. This is crucial context for the AI.

  5. AI Email Generation: The specialized OpenAI n8n node receives the scraped website text and the defined sales pitch details from the initial configuration. Using the system prompt configured within this n8n node, it crafts a personalized sales email subject and body tailored to the target business.

  6. Data Persistence: The final Google Sheets n8n node executes an 'Append or Update' operation, systematically saving the original lead data (Name, Address, Phone, Website), the scraped site text, and the fully generated sales email draft into the designated Google Sheet, completing this powerful n8n workflow.

Installation Guide

To deploy this powerful n8n workflow and start generating leads, follow these installation steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Credential Setup: Ensure you set up and link the necessary credentials within n8n:

OpenAI: Provide your API key to the 'OpenAi account' credential.
Apify: Set up Apify credentials necessary to run the Google Maps Scraper actor (compass/google-maps-scraper).
Google Sheets: Authenticate a Google Sheets account with the correct API scopes enabled.

  1. Google Sheet Preparation: Create a new Google Sheet document and ensure the first row contains the exact headers used by the Google Sheets n8n node. These headers are typically:

店舗名, 住所, Webサイト, 電話番号, サイトから取得した情報, 生成されたメール件名, 生成されたメール本文.

  1. Configure Initial Settings: Open the 'Workflow Configuration' Set n8n node and update the following values to match your outreach campaign:

searchQuery: Your target keyword and location (e.g., 'London bakeries').
serviceName and serviceStrength: Describe your product's name and its key benefit (USP).

  1. Finalize Sheets Link: Open the 'Save to Google Sheets' n8n node and select the Document ID and Sheet Name you prepared in step 3.

  2. Execute: Run the n8n workflow using the Manual Trigger to test the full automation pipeline.

Node Details

This n8n workflow template uses several critical n8n nodes to achieve complex automation:

Manual Trigger n8n Trigger: Starts the n8n workflow execution upon user command. Essential for testing and single-run operations.
Workflow Configuration (Set n8n node): Holds all dynamic variables for the run, centralizing parameters like search query, lead limits, and service details. This makes the n8n workflow highly reusable.
Get user runs list (Apify n8n node): Responsible for executing the Google Maps Scraper and retrieving the results, supplying the subsequent nodes with structured lead data.
Loop Over Items (Split In Batches n8n node): Ensures that every single lead harvested by Apify is processed sequentially through the subsequent AI and scraping logic.
Check Website URL Exists (If n8n node): A core logic n8n node that filters the data stream, ensuring the costly website scraping and AI generation steps are only performed on leads that provide a valid website address (website field is not empty).
Fetch Website HTML (HTTP Request n8n node): Downloads the raw content from the business's website using the URL passed from the Apify n8n node.
Extract Text from HTML (Code n8n node): A custom n8n node that executes JavaScript to sanitize the retrieved HTML, extracting clean, readable text to provide focused context for the AI generation step.
Generate Personalized Email (OpenAI n8n node): The key generative n8n node. It accepts the scraped text and user configuration, leveraging Large Language Models to craft unique, context-aware sales emails. It outputs the generated email body and subject line.


  • Save to Google Sheets (Google Sheets n8n node): The final destination n8n node. It handles data mapping and securely archives all lead information and the AI-generated email drafts for easy access and follow-up.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by
小林幸一
小林幸一

Featured*