AI-powered Gmail assistant: send replies by analyzing thread ID with Sonnet 4.5
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 AI workflow has 9 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model and Anthropic Chat Model.
How it runs
Trigger: On Gmail events.
- Merge: merges the data from its input branches
- Email Classifier (Text Classifier): classifies text into categories with AI, with model: OpenAI Chat Model
- Create a draft (Gmail): work with draft
- Get a thread (Gmail): get (thread)
- Code: runs custom JavaScript code
- Replying email Agent (AI Agent): runs an AI agent, with model: Anthropic Sonnet 4.
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 (8)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - Gmail
n8n-nodes-base.gmail - Merge
n8n-nodes-base.merge - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Text Classifier
@n8n/n8n-nodes-langchain.textClassifier - AI Agent
@n8n/n8n-nodes-langchain.agent - Code
n8n-nodes-base.code - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic
From the author
This workflow automates analyzing Gmail threads and drafting AI-powered replies with the new model Anthropic Sonnet 4.5. This workflow automates the process of analyzing incoming emails and generating context-aware draft replies by examining the entire email…