Intermediate~20 min setupEmail & ProductivityVerified April 2026
Gmail logo
Google Sheets logo

How to Log Gmail Emails by Label to Google Sheets with N8n

Automatically capture sender, subject, date, and content from labeled Gmail messages into a searchable Google Sheets archive.

Steps and UI details are based on platform versions at time of writing β€” check each platform for the latest interface.

Best for

Teams needing custom email processing logic with full control over filtering and data transformation.

Not ideal for

Users wanting simple setup without managing OAuth credentials or learning expression syntax.

Sync type

polling

Use case type

import

Real-World Example

πŸ’‘

A 12-person consulting firm uses this to log all emails labeled 'Client Inquiries' into a searchable Google Sheet archive. Before automation, the office manager manually forwarded inquiry emails to a shared folder and missed urgent requests when traveling. Now every client email gets logged automatically with sender, subject, date, and preview snippet within 5 minutes.

What Will This Cost?

Drag the slider to your expected monthly volume.

/mo
505005K50K

Each platform counts differently β€” Zapier: 1 task per trigger. Make: 1 operation per module per record. n8n: 1 execution per run.

Prices shown for annual billing. Based on published pricing as of April 2026.

Estimated ROI

1000

min saved/mo

$583

labor value/mo

Free

no platform cost

Based on ~2 min manual effort per operation at $35/hr fully loaded labor cost.

Implementation

Skip the setup

Import this workflow directly into n8n

Copy the pre-built n8n blueprint and paste it straight into n8n. All modules, filters, and field mappings are already configured β€” you just need to connect your accounts.

Before You Start

Make sure you have everything ready.

Gmail account with existing labels set up
Google Sheets document with column headers created
N8n instance running (cloud or self-hosted)
Google Cloud Console project with Gmail and Sheets APIs enabled
Admin access to configure OAuth applications in Google

Field Mapping

Map these fields between your apps.

FieldAPI Name
Required
Sender Emailfrom.emailAddress
Subject Linesubject
Received DateinternalDate
4 optional fieldsβ–Έ show
Email Snippetsnippet
Sender Namefrom.name
Message IDid
Thread IDthreadId

Step-by-Step Setup

1

Dashboard > New workflow

Create New Workflow

Start a fresh N8n workflow to handle the Gmail-to-Sheets automation. This gives you a clean workspace to build your email logging system.

  1. 1Click 'New workflow' from the N8n dashboard
  2. 2Name it 'Gmail Label Logger' in the top-left field
  3. 3Click 'Save' to create the workflow
βœ“ What you should see: You should see a blank canvas with a single 'Start' node and the workflow name displayed at the top.
2

Workflow Canvas > + > Gmail

Add Gmail Trigger Node

Set up the Gmail node to monitor your specific label. This will check for new emails every few minutes and trigger the workflow when found.

  1. 1Click the + icon next to the Start node
  2. 2Search for 'Gmail' in the node search box
  3. 3Select 'Gmail' from the results
  4. 4Choose 'Message Received' as the operation
βœ“ What you should see: A Gmail node appears connected to Start, with configuration options showing on the right panel.
⚠
Common mistake β€” Don't select 'New Email' - that triggers on ALL emails, not just labeled ones
n8n
+
click +
search apps
Gmail
GM
Gmail
Add Gmail Trigger Node
Gmail
GM
module added
3

Gmail Node > Credentials > Connect Account

Connect Gmail Account

Authenticate your Gmail account to allow N8n access. You'll need to grant permissions for reading emails and accessing labels.

  1. 1Click 'Connect my account' in the Gmail node settings
  2. 2Choose 'OAuth2' as the authentication method
  3. 3Click 'Sign in with Google' and complete OAuth flow
  4. 4Grant N8n permission to read your Gmail
βœ“ What you should see: Green checkmark appears next to the credentials field showing successful connection.
⚠
Common mistake β€” If OAuth fails, check that N8n's redirect URL is registered in your Google Cloud Console
n8n settings
Connection
Choose a connection…Add
click Add
Gmail
Log in to authorize
Authorize n8n
popup window
βœ“
Connected
green checkmark
4

Gmail Node > Parameters

Configure Label Filter

Specify which Gmail label to monitor. Only emails with this exact label will trigger the workflow and get logged to your sheet.

  1. 1In the Gmail node, find the 'Label Names or IDs' field
  2. 2Type your label name exactly as it appears in Gmail
  3. 3Set 'Include Spam and Trash' to false
  4. 4Leave 'Max Results' at 1 for efficiency
βœ“ What you should see: The label field shows your specified label name, and other options are configured as described.
⚠
Common mistake β€” Label names are case-sensitive - 'Client Inquiries' is different from 'client inquiries'
Gmail
GM
trigger
filter
Condition
matches criteria?
yes β€” passes through
no β€” skipped
Google Sheets
GO
notified
5

Gmail Node > Test step

Test Gmail Connection

Verify the Gmail node can access your labeled emails. This ensures your authentication and label configuration work correctly before proceeding.

  1. 1Click 'Test step' button in the Gmail node
  2. 2Wait for the test to complete
  3. 3Review the sample email data returned
  4. 4Check that sender, subject, and body fields are populated
βœ“ What you should see: Sample data appears showing email fields like 'from', 'subject', 'textPlain', and 'date' with real values.
⚠
Common mistake β€” If no data returns, add a test email to your specified label first
n8n
β–Ά Run once
executed
βœ“
Gmail
βœ“
Google Sheets
Google Sheets
πŸ”” notification
received
6

Workflow Canvas > + > Google Sheets

Add Google Sheets Node

Connect a Google Sheets node to receive the processed email data. This node will append new rows with email details to your tracking spreadsheet.

  1. 1Click + icon after the Gmail node
  2. 2Search for 'Google Sheets' and select it
  3. 3Choose 'Append' as the operation
  4. 4Set Resource to 'Spreadsheet'
βœ“ What you should see: Google Sheets node appears connected to Gmail node with append operation selected.
7

Google Sheets Node > Credentials

Authenticate Google Sheets

Connect your Google account for Sheets access. Use the same Google account that owns the target spreadsheet for simplest permissions.

  1. 1Click 'Connect my account' in the Sheets node
  2. 2Select 'OAuth2' authentication method
  3. 3Complete Google OAuth for Sheets permissions
  4. 4Verify the green connection indicator appears
βœ“ What you should see: Successful connection shown with green checkmark next to credentials field.
⚠
Common mistake β€” The Google account must have edit access to your target spreadsheet
8

Google Sheets Node > Document Selection

Select Target Spreadsheet

Choose the specific Google Sheet and worksheet where email logs will be stored. Create headers if this is a new sheet.

  1. 1Click the 'Document' dropdown in Sheets node
  2. 2Select your target spreadsheet from the list
  3. 3Choose the specific worksheet tab
  4. 4Ensure your sheet has headers: Sender, Subject, Date, Snippet
βœ“ What you should see: Your spreadsheet and worksheet names appear in the respective dropdown fields.
⚠
Common mistake β€” If your spreadsheet doesn't appear, check that it's shared with the connected Google account
9

Google Sheets Node > Columns

Map Email Fields to Columns

Configure how Gmail data maps to your spreadsheet columns. This determines what email information gets captured in each column.

  1. 1In 'Columns' section, set column A to {{ $json.from.emailAddress }}
  2. 2Set column B to {{ $json.subject }}
  3. 3Set column C to {{ $json.internalDate }}
  4. 4Set column D to {{ $json.snippet }}
βœ“ What you should see: Four column mappings showing the Gmail field expressions for sender, subject, date, and snippet.
⚠
Common mistake β€” Use $json.from.emailAddress not just $json.from - the latter returns an object, not the email string
Gmail fields
from
subject
snippet
body
date
available as variables:
1.props.from
1.props.subject
1.props.snippet
1.props.body
1.props.date
10

Workflow Settings > Execution

Configure Polling Schedule

Set how often N8n checks for new labeled emails. Balance between responsiveness and API usage based on your email volume.

  1. 1Click on workflow settings (gear icon)
  2. 2Enable 'Active' to turn on automatic execution
  3. 3Set trigger interval to 'Every 5 minutes'
  4. 4Save the workflow settings
βœ“ What you should see: Workflow shows 'Active' status and polling interval displays as 'Every 5 minutes'.
⚠
Common mistake β€” Intervals under 2 minutes may hit Gmail API rate limits with high email volumes
11

Workflow Canvas > Execute Workflow

Test Complete Workflow

Run the full automation end-to-end to verify emails get properly logged to your sheet. This validates all connections and field mappings.

  1. 1Click 'Execute Workflow' button
  2. 2Monitor the execution progress in the UI
  3. 3Check your Google Sheet for the new row
  4. 4Verify all four columns populated correctly
βœ“ What you should see: New row appears in your Google Sheet with sender email, subject line, timestamp, and email snippet.
12

Workflow Settings > Execution & Error Handling

Enable Production Mode

Activate continuous monitoring so the workflow runs automatically. Add error handling to prevent failures from breaking the automation.

  1. 1Toggle workflow to 'Active' if not already enabled
  2. 2Add error handling: Settings > Error Workflow > Continue On Fail
  3. 3Set up execution logging in Settings > Save Execution Progress
  4. 4Click 'Save' to finalize all settings
βœ“ What you should see: Workflow shows green 'Active' indicator and error handling options are configured as specified.
⚠
Common mistake β€” Without 'Continue On Fail', one bad email format can break the entire workflow

Drop this into an n8n Code node.

Copy this template{{ DateTime.fromMillis(parseInt($json.internalDate)).toLocaleString(DateTime.DATETIME_MED) }}
β–Έ Show code
{{ DateTime.fromMillis(parseInt($json.internalDate)).toLocaleString(DateTime.DATETIME_MED) }}

... expand to see full code

{{ DateTime.fromMillis(parseInt($json.internalDate)).toLocaleString(DateTime.DATETIME_MED) }}

Scaling Beyond 100+ emails/day+ Records

If your volume exceeds 100+ emails/day records, apply these adjustments.

1

Add Message ID Tracking

Store processed Gmail message IDs in a separate sheet or database to avoid logging the same email twice. Use an IF node to check against this list before appending to your main sheet.

2

Implement Batch Processing

Modify the workflow to collect multiple emails and append them in a single Sheets operation. This reduces API calls and improves reliability under Gmail's rate limits.

3

Add Exponential Backoff

Include a Wait node with exponential delay when hitting rate limits. Gmail allows 1 billion quota units per day but limits concurrent requests to prevent overwhelming their servers.

Going live

Production Checklist

Before you turn this on for real, confirm each item.

Troubleshooting

Common errors and how to fix them.

Frequently Asked Questions

Common questions about this workflow.

Analysis

VerdictWhy n8n for this workflow

Use N8n for this if you want full control over the email processing logic and don't mind managing your own instance. The code nodes let you add custom filtering, data transformation, or duplicate detection that Zapier can't match. Skip N8n if you need this running in 10 minutes - the OAuth setup and expression syntax have a learning curve that Make avoids.

Cost

This workflow uses roughly 1 execution per polling cycle (every 5 minutes = 288/day) plus 1 per email found. At 50 emails/month, that's about 8,690 executions monthly. N8n cloud's starter plan at $20/month includes 2,500 executions, so you'd need the $50 plan. Zapier would cost $30/month for the same volume, while Make handles it free under their 1,000 operations limit.

Tradeoffs

Make wins on the polling trigger - it actually monitors Gmail pushes instead of polling every few minutes, so new emails appear in your sheet within seconds. Zapier's interface makes the field mapping more obvious with dropdown selectors instead of N8n's expression syntax. But N8n's code nodes let you deduplicate emails, extract specific content with regex, or format dates exactly how you want - flexibility neither competitor matches.

You'll hit Gmail's API pagination if you have 100+ emails in the monitored label - N8n pulls everything each time, not just new messages. The OAuth token refresh sometimes fails silently, stopping executions until you reconnect manually. Date formatting is tricky because Gmail returns Unix timestamps that display as numbers in Sheets unless you convert them with DateTime expressions.

Ideas for what to build next

  • β†’
    Add Slack Notifications for Priority Emails β€” Connect a Slack node after the Gmail trigger to notify your team when emails from VIP senders or containing urgent keywords arrive in the monitored label.
  • β†’
    Create Email Response Templates β€” Build a follow-up workflow that sends templated Gmail replies based on keywords found in logged emails, automating common responses to frequent inquiries.
  • β†’
    Generate Weekly Email Reports β€” Set up a scheduled workflow that analyzes your Google Sheets email log and sends summary reports showing email volume, top senders, and response time metrics.

Related guides

Was this guide helpful?
← Gmail + Google Sheets overviewn8n profile β†’