Templates / Route Chatwoot customer chats to AI and live agents with Groq and Gemini

Route Chatwoot customer chats to AI and live agents with Groq and Gemini

Needs changes

by Mohan Lal Dhanwani · 527 views · created 2026-05-31 · Support Chatbot, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 17 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Postgres Chat Memory, Gmail, HTTP Request and Groq Chat Model and 4 more.

How it runs

Trigger: When an HTTP POST request hits its webhook URL.

  1. Prepare Field Edits (Edit Fields (Set)): sets or maps fields
  2. Route by Chat Message Type (Switch): routes items into 2 branches
  3. Check Live Agent Assignment (If): checks a condition and branches into true / false
  4. Fetch Live Agent Data (HTTP Request): calls an HTTP API
  5. Generate Assignee Agent ID (Code): runs custom JavaScript code
  6. AI Customer Support Agent (AI Agent): runs an AI agent, with model: Use Groq Chat Model; 3 tools (Access Knowledge Base, Escalate Chat via HTTP, Send Internal Team Email); memory: Store Chat Memory in Postgres
  7. Split AI Messages (Code): runs custom JavaScript code

Services it uses

Postgres Chat MemoryGmailHTTP RequestGroq Chat ModelPinecone Vector StoreEmbeddings Google GeminiGoogle Gemini Chat ModelVector Store Question Answer

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 AI Customer Support 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.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI Customer Support 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 (16)

From the author

Quick overview This workflow automates customer chat with Chatwoot & n8n AI agent that handles incoming chats, qualifies leads, answers FAQs from Pinecone knowledge base, and escalates to a live human agent when one is online. Works with any Chatwoot inbox:…

Excerpt from Mohan Lal Dhanwani's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.