Templates / ✨📊Multi-AI agent chatbot for Postgres/Supabase DB and QuickCharts + tool router

✨📊Multi-AI agent chatbot for Postgres/Supabase DB and QuickCharts + tool router

Needs changes

by Joseph LePage ✓ · 13,427 views · created 2025-03-05 · Internal Wiki, 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 19 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects Postgres, OpenAI Chat Model and Postgres Chat Memory.

How it runs

Trigger: When a chat message arrives (plus 1 other trigger).

  1. 🤖Primary Agent (AI Agent): runs an AI agent, with model: gpt-4o-mini; 2 tools (query_db_tool, generate_quickchart_tool); memory: Postgres Chat Memory
  2. 🔀Tool Agent Router (Switch): routes items into 2 branches
  3. 🤖Secondary Postgres Agent (AI Agent): runs an AI agent, with model: gpt-40-mini-; 3 tools (Execute SQL Query, Table Definitions, DB Schema and Tables)
  4. 🤖Secondary QuickChart Agent (AI Agent): runs an AI agent, with model: gpt-4o-mini-; output parser: QuickChart Object Schema
  5. QuickChart GET URL (Edit Fields (Set)): sets 1 field: url
  6. Create QuickChart (HTTP Request): calls an HTTP API
  7. Final QuickChart URL (Edit Fields (Set)): sets 1 field: quickchart_url

Services it uses

PostgresOpenAI Chat ModelPostgres Chat Memory

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 🤖Primary Agent (v1.7), 🤖Secondary Postgres Agent (v1.7), 🤖Secondary QuickChart 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)
🤖Primary Agent (v1.7), 🤖Secondary Postgres Agent (v1.7), 🤖Secondary QuickChart 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 (11)

From the author

Multi-AI Agent Chatbot for Postgres/Supabase Databases and QuickChart Generation Who is this for? This workflow is ideal for data analysts, developers, and business intelligence teams who need an AI-powered chatbot to query Postgres/Supabase databases and…

Excerpt from Joseph LePage'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.