Triage and reply to Gmail emails with GPT-4.1 mini and Telegram
Ready for 3.0What this workflow does
This AI workflow has 10 nodes and runs on Gmail events. Along the way it connects OpenAI Chat Model, Gmail and Telegram.
How it runs
Trigger: On Gmail events.
- Get Email from Gmail (Gmail): get
- AI Email Analysis Agent (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI GPT-4 Mini
- Parse AI Response (Code): runs custom JavaScript code
- Route by AI Decision (Switch): routes items into 3 branches
- Auto Reply via Gmail (Gmail): reply
- Label for Human Review (Gmail): add labels
- Label as Spam in Gmail (Gmail): add labels
- Send Telegram Notification (Telegram): uses Telegram
Services it uses
Other OpenAI + Gmail templates (1,623) · Other Telegram + OpenAI templates (807) · Other Gmail + Telegram templates (361)
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.
Nodes used (7)
- Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Gmail
n8n-nodes-base.gmail - Gmail Trigger
n8n-nodes-base.gmailTrigger - Telegram
n8n-nodes-base.telegram - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch
From the author
Quick overview This workflow monitors unread Gmail inbox messages, uses OpenAI GPT-4.1 mini to classify and summarize each email and decide a reply strategy, then either sends an automatic Gmail reply, labels messages for human review and notifies via…