Reply to Arabic sales inquiries with Gmail and Ollama
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-12-01.
What this workflow does
This AI workflow has 9 nodes and runs on Gmail events. Along the way it connects Gmail and Ollama Chat Model.
How it runs
Trigger: On Gmail events.
- 🔧 Extract Email Data (Code): runs custom JavaScript code
- 🤖 AI Email Classifier (AI Agent): runs an AI agent, with model: Ollama Chat Model; output parser: Structured Output Parser
- 🎯 Extract Classification (Code): runs custom JavaScript code
- 🔀 Route by Category (Switch): routes items into 6 branches
- If: checks a condition and branches into true / false
- Reply to a message (Gmail): reply
Services it uses
Other Gmail + Ollama templates (18)
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 - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - Switch
n8n-nodes-base.switch - Ollama Chat Model
@n8n/n8n-nodes-langchain.lmChatOllama - Gmail
n8n-nodes-base.gmail - If
n8n-nodes-base.if - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
From the author
Quick overview This workflow monitors a Gmail inbox for unread messages from a specified sender, extracts and cleans the email content, uses an Ollama (Qwen) model to classify sales inquiries in Arabic and draft replies, and automatically replies in Gmail…