Skip to main content

Generate personalized cold outreach emails with Apify, OpenAI, and Google Sheets

Workflow preview

Workflow preview
100%
Generate personalized cold outreach emails with Apify, OpenAI, and 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

Automated Cold Email Personalization This workflow automates the creation of highly personalized cold outreach emails by extracting lead data, scraping company websites, and leveraging AI to craft ...

Best for

  • Lead Nurturing automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.googlesheets, n8n-nodes-base.code, n8n-nodes-base.splitinbatches, n8n-nodes-base.httprequest, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.stickynote, n8n-nodes-base.manualtrigger, n8n-nodes-base.markdown

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Generate personalized cold outreach emails with Apify, OpenAI, and Google Sheets
Workflow name
Generate personalized cold outreach emails with Apify, OpenAI, and Google Sheets

Automated Cold Email Personalization

This workflow automates the creation of highly personalized cold outreach emails by extracting lead data, scraping company websites, and leveraging AI to craft unique email components. This is ideal for sales teams, marketers, and business development professionals looking to scale their outreach efforts while maintaining a high degree of personalization.


How It Works

  1. Generate Batches: The workflow starts by generating a sequence of numbers, defining how many leads to process in batches.
  2. Scrape Lead Data: It uses an external API (Apify) to pull comprehensive lead information, including contact details, company data, and social media links.
  3. Fetch Client Data: The workflow then retrieves relevant client details from your Google Sheet based on the scraped data.
  4. Scrape Company Website: The lead's company website is automatically scraped to gather content for personalization.
  5. Summarize Prospect Data: An OpenAI model analyzes both the scraped website content and the individual's profile data to create concise summaries and identify unique angles for outreach.
  6. Craft Personalized Email: A more advanced OpenAI model uses these summaries and specific instructions to generate the "icebreaker," "intro," and "value proposition" components of a personalized cold email.
  7. Update Google Sheet: Finally, these generated email components are saved back into your Google Sheet, enriching your lead records for future outreach.

Google Sheet Structure

Your Google Sheet must have the following exact column headers to ensure proper data flow:

  • Email (unique identifier for each lead)
  • Full Name
  • Headline
  • LinkdIn
  • cityName
  • stateName
  • company/cityName
  • Country
  • Company Name
  • Website
  • company/businessIndustry
  • Keywords
  • icebreaker (will be populated by the workflow)
  • intro (will be populated by the workflow)
  • value_prop (will be populated by the workflow)

Setup Instructions

  1. Add Credentials:

    • In n8n, add your OpenAI API key via the Credentials menu.
    • Connect your Google account via the Credentials menu for Google Sheets access.
    • You will also need an Apify API key for the Scraper node.
  2. Configure Google Sheets Nodes:

    • Select the Client data and Add email data to sheet nodes.
    • For each, choose your Google Sheets credential, select your spreadsheet, and the specific sheet name.
    • Ensure all column mappings are correct according to the "Google Sheet Structure" section above.
  3. Configure Apify Scraper Node:

    • Select the Scraper node.
    • Update the Authorization header with your Apify API token (Bearer KEY).
    • In the JSON Body, set the searchUrl to your Apollo link (or equivalent source URL for lead data).
  4. Configure OpenAI Nodes:

    • Select both Summarising prospect data and Creating detailed email nodes.
    • Choose your OpenAI credential from the dropdown.
    • In the Creating detailed email node's prompt, replace PUT YOUR COMPANY INFO HERE with your company's context and verify the target sector for the email generation.
  5. Verify Update Node:

    • On the final Add email data to sheet node, ensure the Operation is set to Append Or Update and the Matching Columns field is set to Email.

Customization Options 💡

  • Trigger: Change the When clicking 'Execute workflow' node to an automatic trigger, such as a Cron node for daily runs, or a Google Sheets trigger when new rows are added.
  • Lead Generation: Modify the Code node to change the number of leads processed per run (currently set to 50).
  • Scraping Logic: Adjust the Scraper node's parameters (e.g., count) or replace the Apify integration with another data source if needed.
  • AI Prompting: Experiment with the prompts in the Summarising prospect data and Creating detailed email OpenAI nodes to refine the tone, style, length, or content focus of the generated summaries and emails.
  • AI Models: Test different OpenAI models (e.g., gpt-3.5-turbo, gpt-4o) in the OpenAI nodes to find the optimal balance between cost, speed, and output quality.
  • Data Source/CRM: Replace the Google Sheets nodes with integrations for your preferred CRM (e.g., HubSpot, Salesforce) or a database (e.g., PostgreSQL, Airtable) to manage your leads.

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 - Client data

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

Block 2 - Increment Page Number

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

Block 3 - Generate Page Numbers

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

Block 4 - Loop over one by one

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

Block 5 - Apollo Scraper

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

Block 6 - Domain scrape

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

Block 7 - Summarising prospect data

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

Block 8 - Creating detailed email

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

Block 9 - Add email data to sheet

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

Block 10 - Sticky Note

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

Block 11 - When clicking ‘Execute workflow’

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

Block 12 - Website HTML to Markdown

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

3. Summary Table

Workflow Generate personalized cold outreach emails with Apify, OpenAI, and Google Sheets
Complexity intermediate
Nodes 12
Categories Lead Nurturing, Multimodal AI
Author Matthew
Published 17 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6098/6098.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 cold outreach emails with Apify, OpenAI, and Google Sheets do?

Automated Cold Email Personalization This workflow automates the creation of highly personalized cold outreach emails by extracting lead data, scraping company websites, and leveraging AI to craft ...

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