Automate Gmail Campaigns with Google Sheets & n8n

This workflow automates sending personalized emails via Gmail using data filtered from Google Sheets based on current date and status, saving hours on manual outreach and ensuring accurate communication timing.
googleSheets
gmail
filter
+4
Workflow Identifier: 2033
NODES in Use: Filter, Set, Sticky Note, Schedule Trigger, Google Sheets, Gmail, Merge

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

Opening Problem Statement

Meet Nik, a customer relations manager at a growing startup who needs to manually send daily email updates to hundreds of customers. The messages are drafted in a Google Sheets document, but the process of filtering which emails to send, sending them, and then updating their status consumes over two hours every day. Nik often misses messages or sends emails to incorrect recipients because the manual filtering and tracking in the spreadsheet is error-prone and time-consuming.

For Nik, the challenge lies in delivering the right message at the right time without spending excessive time on manual tasks. Missing deadlines or miscommunication risks losing customer trust and slows down team productivity.

What This Automation Does

This n8n workflow automates the entire process of sending personalized customer emails using data managed in Google Sheets and Gmail. Here’s what it accomplishes when running automatically every minute:

  • Fetches messages from a Google Sheet containing customer email details, message subjects, titles, status, and send dates.
  • Filters these messages to select only those scheduled for “Today’s Date” and with a status of “Waiting for sending,” ensuring no message is sent early or late.
  • Sends personalized emails via the Gmail node directly to each intended recipient using the subject and message content specified in the sheet.
  • Updates the Google Sheet to mark messages as “Sent successfully,” so they aren’t sent multiple times and the team has an up-to-date record.
  • Ensures smooth and accurate workflow by combining data at multiple points with merge and set data nodes.
  • Runs every minute through a Schedule Trigger, allowing near real-time message dispatch for dynamic, date-sensitive communications.

Thanks to this workflow, Nik saves over two hours daily of manual coordination, reducing human errors and improving communication reliability.

Prerequisites ⚙️

  • 📊 Google Sheets account with OAuth2 credentials – to read and update the spreadsheet data.
  • 📧 Gmail account with OAuth2 credentials – to send emails through the Gmail node securely.
  • 🔑 Configured OAuth credentials in n8n for both Google Sheets and Gmail nodes.
  • ⏱️ n8n instance – cloud-hosted or self-hosted for running and scheduling the workflow.
  • Optional: Self-hosting option for n8n if preferred for data control (see Hostinger hosting guide).

Step-by-Step Guide

Step 1: Set Up a Schedule Trigger to Run Every Minute

In n8n, add the Schedule Trigger node.

Configure it as follows:
Click New Node > Core Nodes > Schedule Trigger.
Select Minutes interval and set it to 1.

You should see the trigger running every minute automatically when saving and activating the workflow.

Common Mistake: Forgetting to activate the workflow means it won’t run as scheduled.

Step 2: Add Google Sheets Node to Retrieve Customer Messages

Add the Google Sheets node named Retrieve Customer Messages Data.

Configure it to read the spreadsheet:
Document ID: 126qQdkEWt_4Vkxvu6G80rBeFdIp_a8ISMz-898fa2D4
Sheet Name: gid=0

Under credentials, select your configured Google Sheets OAuth2 credentials (Nik’s Google in this case).

This node pulls all customer message data including Email, Name, Status, Date, Title, and Subject.

Common Mistake: Incorrect Document ID or Sheet Name causes no data to be retrieved.

Step 3: Filter Messages Waiting for Sending

Add the Filter node called Filter Status (Waiting for sending).

Set the filter conditions to ensure:

  • Status equals “Waiting for sending”
  • Required fields like Title, Subject, Email, Name, and Date exist
  • Date matches current date (use the expression: DateTime.fromFormat($json["Date"], 'yyyy/MM/dd').startOf('day') === $now.startOf('day'))

This keeps only records ready to be sent that day.

Common Mistake: Date format in the sheet must be yyyy/MM/dd or the filter will fail.

Step 4: Merge Fields for Email Preparation

Add Merge node named Merge fields with the mode set to combine by position.

This will combine the filtered data with the scheduling data to prepare for email sending.

Common Mistake: Not setting combination mode correctly causes data mismatch or failures.

Step 5: Set Data Required by Gmail Node

Add Set node called Set data.

Map fields from the merged data:
email = $json.Email
name = $json.Name
ID = $json.ID

This sends properly formatted data to the Gmail and update nodes.

Common Mistake: Missing fields here will cause incomplete emails or update failures.

Step 6: Send Emails Using Gmail Node

Add the Gmail node named Send a message (Gmail).

Configure to send as follows:
Send To: ={{ $json.Email }}
Subject: ={{ $json.Title }}
Message: ={{ $json.Subject }}
Email type: Text

Select Gmail OAuth2 credentials linked to your Gmail account.

You can test this step by running the workflow manually to verify emails are delivered.

Common Mistake: Gmail account lacking necessary OAuth permissions will result in failure.

Step 7: Update Google Sheet with Sent Status

Add another Google Sheets node called Update Message Status.

Set the operation to Update using the ID field to match.

Update column Status to “Sent successfully” for sent messages.

This ensures your sheet reflects current status accurately.

Common Mistake: Not setting matching column properly causes incorrect rows to update.

Customizations ✏️

1. Customize Email Content Format

In the Send a message (Gmail) node, modify the message field to use HTML instead of plain text for richer formatting by changing “Email type” to HTML and crafting HTML content.

2. Change Schedule Frequency

In the Schedule Trigger node, adjust the interval from every minute to daily or at specific hours if you prefer less frequent messaging.

3. Add Additional Filters for Priority Customers

Extend the Filter Status (Waiting for sending) node with additional conditions using new data columns (e.g., Priority Level) to send emails only to certain groups.

Troubleshooting 🔧

Problem: No Emails Sent – Gmail Authentication Error

Cause: OAuth credentials for Gmail not authorized or expired.
Solution: Go to Credentials in n8n, re-authenticate Gmail OAuth2 credentials, then retry.

Problem: Filter Node Passing No Data

Cause: Date format mismatch or missing required fields.
Solution: Verify the date is formatted as yyyy/MM/dd in the Google Sheet and that all required fields are filled.

Pre-Production Checklist ✅

  • Verify Google Sheets Document ID and Sheet Name are correct.
  • Check Gmail OAuth2 credentials are valid and authorized.
  • Test filter conditions manually by previewing data after Filter node runs.
  • Send test emails with sample data to confirm delivery and formatting.
  • Backup your Google Sheets data before updating statuses.

Deployment Guide

Activate the workflow by clicking Active in n8n. Monitor the execution via the Executions panel to ensure emails are sent on time. Adjust the schedule trigger as needed for business hours or different time zones.

FAQs

Can I use Outlook instead of Gmail?

Currently, this workflow uses the Gmail node, but you can replace it with an SMTP node configured for Outlook SMTP settings.

Does this consume Gmail API quota?

Yes, sending many emails counts against Gmail API usage limits. Google enforces daily sending limits per account.

Is my data secure?

With OAuth2 credentials and n8n security best practices, your data transmissions are encrypted. Self-hosting increases control over data security.

Conclusion

By automating Nik’s daily email campaign workflow using n8n with Google Sheets and Gmail, we’ve eliminated manual filtering and sending tasks, saving over two hours daily. This ensures timely, accurate communication that boosts customer trust and efficiency.

Next steps to enhance this workflow could include adding dynamic email templates, integrating CRM systems for richer customer data, or setting up detailed email delivery and open tracking.

With this automation, you too can provide reliable, personalized outreach with minimal manual effort.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free