Log New Gmail Messages Automatically in Google Sheets

Go to Workflow
0 views
Built by Robert Breen Robert Breen
Created on August 26, 2025

Description

๐Ÿง‘โ€๐Ÿ’ป Description
This workflow automatically fetches new Gmail messages since the last run and appends them into a Google Sheet with their ID, snippet, and timestamp.

Itโ€™s designed for professionals, small business owners, and operations teams who need a simple way to keep an ongoing log of emails, build lightweight CRMs, or power downstream automations like email tracking, reporting, or follow-up reminders.

โš™๏ธ Setup Instructions for Gmail โ†’ Google Sheets Email Log

1๏ธโƒฃ Connect Gmail
In n8n โ†’ Credentials โ†’ New โ†’ Gmail OAuth2
Log in with your Gmail account & approve access
Attach this credential to the Get new messages node in the workflow

2๏ธโƒฃ Connect Google Sheets
Copy this Google Sheet template into your own Drive
In n8n โ†’ Credentials โ†’ New โ†’ Google Sheets (OAuth2) โ†’ log in with your Google account & save
In the workflow, select your Spreadsheet ID and Worksheet (Sheet1 by default) in the Google Sheets nodes

๐Ÿง  How Email Logging Automation Works
Get Current Emails** โ†’ Reads the last logged messages from Google Sheets
Get Max Date** โ†’ Finds the most recent email timestamp
Combine** โ†’ Passes the last timestamp and todayโ€™s date together
Get New Messages** โ†’ Fetches all new Gmail messages after the last logged date
Add Emails to Sheets** โ†’ Appends message ID, snippet, and date to the sheet

๐ŸŽ›๏ธ Customization Guidance
Filter by Sender or Subject** โ†’ Modify the Gmail query to only log messages from specific addresses or with certain keywords.
Track Labels** โ†’ Add Gmail labels to your sheet to separate categories (e.g., โ€œLeads,โ€ โ€œSupport,โ€ โ€œInvoicesโ€).
Auto-Reply** โ†’ Extend with an additional Gmail node to send automated responses to new messages.
Send Alerts** โ†’ Add a Slack or Email node to ping your team whenever a new email is logged.
Analytics** โ†’ Use Google Sheets formulas or connect to BI tools to analyze trends like response times or sender frequency.

๐Ÿ“ฌ Contact
Need advanced customization (e.g., multi-inbox tracking, CRM integration, or automated follow-ups)?

๐Ÿ“ง [email protected]
๐Ÿ”— Robert Breen
๐ŸŒ ynteractive.com

Nodes Used (3)

Code
n8n-nodes-base.code
Gmail
n8n-nodes-base.gmail
Google Sheets
n8n-nodes-base.googleSheets