Categorize emails and draft Gmail replies with Groq and Google Sheets
Needs changesWhat this workflow does
This AI workflow has 12 nodes and runs on Gmail events. Along the way it connects Gmail, Groq Chat Model and Google Sheets.
How it runs
Trigger: On Gmail events.
- Check Email Content (If): checks a condition and branches into true / false
- Set Email Fields (Edit Fields (Set)): sets 6 fields: sender, sender_name, subject…
- Email Analysis Agent (AI Agent): runs an AI agent, with model: Groq Language Model
- Parse AI Analysis (Code): runs custom JavaScript code
- Check Parse Success (If): checks a condition and branches into true / false
- Evaluate Priority Level (If): checks a condition and branches into true / false
- Send High Priority Alert (Gmail): uses Gmail
- Append to Google Sheets (Google Sheets): append
- Assess Reply Necessity (If): checks a condition and branches into true / false
- Draft Gmail Reply (Gmail): create draft
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Groq + Google Sheets templates (156) · Other Groq + Gmail templates (125)
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Email Analysis Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- Also check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll).
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2026 — 6% of 2026 templates need changes for 3.0. See how template age affects 3.0 readiness →
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Email Analysis Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (8)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow monitors Gmail for new emails, uses Groq (via the LangChain Agent node) to categorize and summarize each message and draft a reply, sends an alert email for high-priority items, and logs the analysis and draft details to Google…