Personalized Email Campaign Automation using Google Docs & SMTP - n8n Workflow

Deploy this powerful n8n workflow to automate personalized cold email campaigns using contact lists in Google Sheets, templates from Google Docs, and an external SMTP service. Utilize the n8n node structure for reliable outreach.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

• Sales teams needing scalable, personalized cold outreach.
• Marketers running bulk email campaigns with strict rate limits.
• Users seeking reliable n8n templates for integrating G Suite services.
• Businesses that require tracking of successful sends directly in their contact database (Google Sheets).

Overview

This robust n8n workflow solves the tedious problem of mass personalization in outreach while ensuring compliance with SMTP sending limits. It leverages Google Sheets as the CRM or contact source and Google Docs for easily editable rich email templates. The core functionality of this n8n template relies on dynamic substitution: it pulls a template and, for every contact, replaces placeholders (like {{firstname}} and {{company}}) with actual data. A critical feature of this n8n workflow is the integrated rate limiting using a Wait n8n node, which manages sending speed to adhere to SMTP provider quotas (such as OVHCloud limits mentioned in the notes), ensuring high deliverability and preventing account suspension. This scheduled n8n trigger system provides a fully automated, set-it-and-forget-it solution.

How it Works

The process begins with the Schedule Trigger n8n node, which initiates the automated campaign run. First, a Set n8n node (settings) defines essential global variables, including the email subject and the document IDs for Google Sheets and Google Docs.

Simultaneously, the Google Docs n8n node fetches the raw email template content, and the Google Sheets n8n node retrieves the full contact list. A Filter n8n node immediately processes the contact list, selecting only rows where the 'process' and 'err' columns are empty, ensuring recipients are not duplicated.

All data is combined via a Merge n8n node. The subsequent Set n8n node (updatebody) is where the heavy lifting of personalization occurs, using Javascript expressions to dynamically replace template variables with specific contact data (e.g., replacing {{firstname}} with the contact's actual first name).

The workflow then enters a loop using the Loop Over Items (Split In Batches) n8n node. For each item (contact), the Email Send n8n node utilizes configured SMTP credentials to dispatch the personalized message.

Following a successful send, the Google Sheets n8n node (updatecontacts) immediately updates the corresponding row, marking the 'process' column with a current timestamp, thereby tracking progress. Finally, a Wait n8n node introduces a 20-second delay, crucial for managing the sending rate, before the flow loops back to send the next email. This structure ensures a compliant and steady sending pace for the entire n8n workflow.

Installation Guide


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

  2. Configure Credentials: You will need to configure three sets of credentials:

- Google Sheets OAuth2 API: For accessing your contact sheet.
- Google Docs OAuth2 API: For retrieving your email template.
- SMTP Credentials: For sending the actual emails (used by the sendemail n8n node).

  1. Set Document IDs: In the settings n8n node, replace the placeholders for googledocid and googlesheetid with the actual IDs of your template and contact list documents.

  2. Define Template Variables: Ensure your Google Docs template uses the supported variables: {{firstname}}, {{lastname}}, {{company}}, and {{email}}.

  3. Review Google Sheet Headers: Your contact sheet must contain the required columns: email, firstname, lastname, company, process, and err.

  4. Adjust Rate Limit: Review the Wait n8n node configuration. Adjust the delay (default 20 seconds) to match the quota limits imposed by your specific SMTP provider.

Node Details

Schedule Trigger

Function: Serves as the primary n8n trigger, initiating the campaign run based on a defined schedule.
Key Configuration: Set to run periodically to monitor and process pending contacts.

Set (settings)

Function: Stores global configuration parameters used throughout the n8n workflow.
Key Configuration: Defines emailsubject, googledocid, and googlesheetid.

Google Docs (template)

Function: Retrieves the content of the pre-written email template from the specified Google Doc ID.
Key Configuration: Uses the googledocid variable; set to execute once at the beginning of the flow.

Google Sheets (contacts)

Function: Fetches the list of contacts, including all columns necessary for personalization and tracking.
Key Configuration: Uses the dynamic googlesheetid from the settings n8n node.

Filter (notemailed)

Function: Ensures idempotency by filtering out contacts that have already been processed or resulted in an error.
Key Configuration: Filters for rows where both process and err columns are empty.

Set (updatebody)

Function: Performs critical data transformation, dynamically replacing personalization placeholders in the Google Docs template with the contact-specific data.
Key Configuration: Uses JavaScript replaceAll expressions to substitute variables like {{firstname}} in the template content.

Email Send (sendemail)

Function: Sends the personalized email via the configured SMTP server.
Key Configuration: Uses the dynamically generated template as the body and the contact's email as the recipient.

Google Sheets (updatecontacts)

Function: Marks the contact as processed in Google Sheets after the email is successfully sent.
Key Configuration: Updates the process column with the current timestamp, matching the row based on the row_number column.

Wait

Function: Implements rate limiting to comply with SMTP provider sending quotas.
Key Configuration: Set to a 20-second delay per email (based on the OVHCloud example noted in the sticky notes).

Related n8n Workflows

Free

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

Data Sommelier | Sales Architect | Advisor | GTM

Featured*