Automatic Gmail unsubscribe detection with AI and Google Sheets contact management
Ready for 3.0What this workflow does
This AI workflow has 15 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model and Google Sheets.
How it runs
Trigger: On Gmail events.
- Personal Emails? (If): checks a condition and branches into true / false
- DETECT INTENT (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model
- NORMALIZE AI OUTPUT (Code): runs custom JavaScript code
- UNSUBSCRIBE? (If): checks a condition and branches into true / false
- Get unsubscribe sheet (Google Sheets): uses Google Sheets
- IS EMAIL THERE? (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- ADD TO UNSUBSCRIBE (Google Sheets): append
- CHECK MAIN SHEET (Google Sheets): uses Google Sheets
- Delete rows or columns from sheet (Google Sheets): delete
…plus 1 more step. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
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) (Watch New replies).
Nodes used (8)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp
From the author
Automatically detect unsubscribe replies in your outreach emails and clean your Google Sheets contact list; keeping your domain reputation and deliverability strong. --- 🎯 Who it’s for This template is designed for freelancers, lead generation specialists,…