Track and de-duplicate email leads in Google Sheets from Gmail
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This workflow has 6 nodes and runs on Gmail events. Along the way it connects Gmail and Google Sheets.
How it runs
Trigger: On Gmail events.
- Extract Lead Details (Code): runs custom JavaScript code
- Read Leads in Sheets (Google Sheets): read (sheet)
- Verify Unique Lead (Code): runs custom JavaScript code
- Determine New Lead Status (If): checks a condition and branches into true / false
- Add Lead to Sheets (Google Sheets): append (sheet)
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger).
Nodes used (4)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if
From the author
Quick overview This workflow polls Gmail for new unread emails with a specific label, extracts lead details from each message, checks Google Sheets for duplicates by email or message ID, and appends only new leads to a designated spreadsheet. How it works 1.…