Personalized Cold Outreach Draft Generator using GPT-4o-mini and Gmail - n8n Workflow

Generate highly personalized cold email drafts directly in Gmail using lead data sourced from Google Sheets and the power of GPT-4o-mini. A robust n8n workflow for high-efficiency marketing.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Sales teams needing high-volume, personalized outreach.

  • Marketing automation specialists looking for advanced n8n templates.

  • Businesses utilizing cold outreach who want human review before sending.

  • Users looking to integrate large language model (LLM) personalization within their existing n8n workflows.

Overview

Generating personalized cold emails at scale is a significant challenge for sales teams. This n8n workflow streamlines the entire process, turning a raw list of leads in a Google Sheet into polished, highly personalized Gmail drafts, ready for final review and dispatch. This automation solves the tedious task of manual personalization by leveraging the speed and accuracy of GPT-4o-mini to craft unique email bodies and subject lines specific to each lead's business type and contact details.

By using this specific n8n template, you ensure that every outreach attempt is tailored and professional. The integration of the Google Sheets n8n node for source data and the Gmail n8n node for draft creation provides a controlled environment, guaranteeing human oversight before any email is actually sent. This is a crucial, high-value n8n workflow for modern sales operations.

How it Works

This comprehensive n8n workflow is designed to process leads in batches, ensuring no lead is contacted twice unnecessarily.


  1. Initiation: The process starts with a Manual n8n trigger. While manual here, it can easily be converted to a Schedule n8n trigger for routine runs.

  2. Data Retrieval: The Google Sheets n8n node, titled 'Read Business Data', fetches all entries from the specified lead sheet.

  3. Filtering: An If n8n node ('Filter Unsent Emails') ensures data quality by checking two conditions: the emailsent column must not contain 'yes', and the email address field must be populated. Only valid, uncontacted leads proceed.

  4. AI Personalization: Two parallel HTTP Request n8n nodes ('Personalize Email (ChatGPT)' and 'Generate Subject (ChatGPT)') interact with the OpenAI API (GPT-4o-mini). These generate a unique, persuasive email body and a short, curiosity-driving subject line based on the lead's contextual data (business name, type, city).

  5. Merging Data: The Merge n8n node combines the two AI-generated outputs, preparing the payload for the email creation.

  6. Drafting: The 'Create Email Draft' Gmail n8n node utilizes the generated subject and body to save a new draft email in the user's connected Gmail account.

  7. Database Update: The 'Update Google Sheet' Google Sheets n8n node ensures accountability. It updates the original lead row using the businessname as the matching column, recording the date sent, the subject used, and flagging the row as processed (by saving the email body into the email_sent column). This prevents future runs of the n8n workflow from reprocessing the same lead.

  8. Rate Control: A crucial Wait n8n node introduces a 3-second delay between processing each successful item, helping to manage API rate limits for the Google Sheets n8n node.

Installation Guide

To deploy this powerful n8n workflow, follow these setup steps:


  1. Import: Copy the provided JSON data and import it into your n8n instance using the 'New' > 'Import from JSON' option.

  2. Google Sheets Credentials: Configure the 'Read Business Data' and 'Update Google Sheet' n8n nodes. You will need to select your Google Sheets credential and point the nodes to the correct Spreadsheet Document ID and Sheet Name containing your lead data (ensure column names match those referenced in the workflow: businessname, emailsent, contact_name, etc.).

  3. OpenAI Credentials: The 'Personalize Email (ChatGPT)' and 'Generate Subject (ChatGPT)' n8n nodes require an OpenAI API Key credential. Ensure this credential is set up for HTTP Request authentication.

  4. Gmail Credentials: The 'Create Email Draft' n8n node requires a Gmail OAuth2 credential with necessary scopes to create drafts.

  5. Review Prompts: Check the prompts within the AI HTTP Request n8n nodes to ensure the tone and content align with your desired outreach style. GPT-4o-mini is configured for quick, conversational drafts.

  6. Test Run: Execute the Manual n8n trigger to test one item, verifying that the draft is created in Gmail and the sheet is updated correctly.

Node Details


  • Manual Trigger: The starting n8n trigger for the flow. Useful for testing and manual execution of the n8n workflow.

  • Read Business Data (Google Sheets n8n node): Reads all rows from the specified Google Sheet. Ensures the latest lead data is used.

  • Filter Unsent Emails (If n8n node): A core logic n8n node that ensures efficiency by only passing data items where the emailsent status is not 'yes'.

  • Personalize Email (ChatGPT) (HTTP Request n8n node): Connects to OpenAI's GPT-4o-mini model. Key configuration involves a large prompt template that dynamically inserts lead data (e.g., {{$json["businessname"]}}) to generate a unique email body.

  • Generate Subject (ChatGPT) (HTTP Request n8n node): Also uses GPT-4o-mini to generate a highly concise and compelling subject line, adhering to strict character limits to optimize deliverability.

  • Merge Subject and Body (Merge n8n node): Combines the AI outputs from parallel branches back into a single item stream, necessary before the drafting step.

  • Create Email Draft (Gmail n8n node): The action n8n node responsible for interacting with the user’s mailbox, creating an HTML draft using data dynamically pulled from previous nodes.

  • Update Google Sheet (Google Sheets n8n node): Updates the row in the sheet, marking the status and recording the output (subject and email body) by matching on business_name.

  • Rate Limit Wait (Wait n8n node): Crucial flow control n8n node, set to pause 3 seconds per item to manage external API rate limitations during batch processing.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by

Founder - Runwise AI Agency

Featured*