AI-powered Gmail assistant: send replies by analyzing thread ID with Sonnet 4.5
Ready for 3.0What 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
Other OpenAI + Gmail templates (1,623) · Other Anthropic + Gmail templates (192) · Other OpenAI + Anthropic templates (115)
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…