Skip to main content

Generate personalized sales emails from Google Maps with OpenAI to Google Sheets

Workflow preview

Workflow preview
100%
Generate personalized sales emails from Google Maps with OpenAI 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

Generate personalized sales emails from Google Maps results to Google Sheets This workflow automates the entire process of lead generation and personalized outreach drafting for local businesses. I...

Best for

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

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.set, n8n-nodes-base.splitinbatches, n8n-nodes-base.if, n8n-nodes-base.httprequest, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by 小林幸一.

Original n8n.io source

1.1 Workflow description

Title
Generate personalized sales emails from Google Maps with OpenAI to Google Sheets
Workflow name
Generate personalized sales emails from Google Maps with OpenAI to Google Sheets

Generate personalized sales emails from Google Maps results to Google Sheets

This workflow automates the entire process of lead generation and personalized outreach drafting for local businesses. It utilizes Apify to scrape business data from Google Maps based on your search criteria (e.g., "Cafes in Shibuya"), visits each business's website to extract content, and uses OpenAI to generate a highly personalized sales email that connects the business's unique characteristics with your service's value proposition. Finally, it saves the business details, scraped data, and the generated email draft into Google Sheets.

This template is perfect for reducing the manual effort required to research leads and write initial cold outreach emails.

Who is this for

  • Sales Representatives looking to automate lead sourcing and initial drafting.
  • Marketing Agencies doing outreach for local businesses.
  • Freelancers offering web design, SEO, or reservation system services to brick-and-mortar stores.

What it does

  1. Configuration: You define your search query (e.g., "Gyms in London"), the number of leads to fetch, and details about the service you are selling.
  2. Lead Scraping: The workflow triggers an Apify actor (Google Maps Scraper) to find businesses matching your criteria.
  3. Website Analysis: It checks if the business has a website, fetches the HTML, and extracts relevant text to understand the business's vibe and offerings.
  4. AI Email Generation: OpenAI analyzes the scraped website text and generates a specific, personalized email subject and body promoting your service.
  5. Data Storage: All data (Business Name, Phone, Address, Website, Scraped Info, and Email Draft) is appended to a Google Sheet.

Requirements

  • n8n (v1.0 or later)
  • Apify Account: You need an Apify account and the compass/google-maps-scraper actor.
  • OpenAI Account: An API key for generating the email content.
  • Google Cloud Platform: A project with the Google Sheets API enabled.

How to set up

  1. Credentials: Set up your credentials for Apify, OpenAI, and Google Sheets in n8n.
  2. Google Sheet: Create a new Google Sheet and add the following headers in the first row:
    • 店舗名 (Store Name)
    • 住所 (Address)
    • Webサイト (Website)
    • 電話番号 (Phone Number)
    • サイトから取得した情報 (Info from Website)
    • 生成されたメール件名 (Generated Subject)
    • 生成されたメール本文 (Generated Body)
  3. Workflow Configuration Node: Open the first "Workflow Configuration" node and update the following values:
    • searchQuery: The location and keyword you want to target.
    • serviceName: The name of the product you are selling.
    • serviceStrength: The USP (Unique Selling Proposition) of your product.
  4. Google Sheets Node: Open the "Save to Google Sheets" node and select the file you created in step 2.

How to customize

  • Change the Prompt: Open the "Generate Personalized Email" (OpenAI) node to modify the system prompt. You can change the tone, language (currently set to Japanese context in your example), or structure of the sales email.
  • Filter Results: You can add logic to the "Check Website URL Exists" node to filter out specific types of businesses or domains.
  • Limit Scraping: Adjust the maxPlaces value in the Configuration node to control how many leads you process per run to save on API credits.

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 - Manual Trigger

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

Block 2 - Workflow Configuration

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

Block 3 - Loop Over Items

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

Block 4 - Check Website URL Exists

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

Block 5 - Fetch Website HTML

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

Block 6 - Extract Text from HTML

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

Block 7 - Generate Personalized Email

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2

Block 8 - Save to Google Sheets

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

Block 9 - Get user runs list

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

Block 10 - Sticky Note

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

Block 11 - Sticky Note1

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

Block 12 - Sticky Note2

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

Block 13 - Sticky Note3

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

Block 14 - Sticky Note4

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

Block 15 - Sticky Note5

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

3. Summary Table

Workflow Generate personalized sales emails from Google Maps with OpenAI to Google Sheets
Complexity advanced
Nodes 15
Categories Lead Generation, Multimodal AI
Author 小林幸一
Published 20 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11028/11028.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 Generate personalized sales emails from Google Maps with OpenAI to Google Sheets do?

Generate personalized sales emails from Google Maps results to Google Sheets This workflow automates the entire process of lead generation and personalized outreach drafting for local businesses. I...

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, Multimodal AI use case.