Send AI-generated Gmail auto replies with GPT-4o-mini and Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 11 nodes and runs on Gmail events. Along the way it connects Gmail, Google Sheets and OpenAI.
How it runs
Trigger: On Gmail events.
- Config - Rules & Thresholds (Edit Fields (Set)): sets 10 fields: ignoreListIncludes, ignoreSubjectIncludes, ignoreLabelsIncludes…
- Normalize - Email Payload (Edit Fields (Set)): sets 8 fields: Normalize - Email Payload, from_raw, from_lower…
- If: checks a condition and branches into true / false
- Code: runs custom JavaScript code
- Get row(s) in sheet (Google Sheets): uses Google Sheets
- If: checks a condition and branches into true / false
- Gmail: get many
- If: checks a condition and branches into true / false
- Message a model (OpenAI): uses OpenAI
- Reply to a message (Gmail): reply
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) (Gmail Trigger - New Emails).
Nodes used (7)
- Edit Fields (Set)
n8n-nodes-base.set - Gmail Trigger
n8n-nodes-base.gmailTrigger - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail - OpenAI
@n8n/n8n-nodes-langchain.openAi
From the author
Overview This workflow automatically replies to important incoming Gmail messages using AI, while preventing duplicate or unnecessary replies. It applies multiple safety checks (filters, Google Sheets history, and Gmail sent history) to ensure replies are…