Ask your PostgreSQL database complex questions and receive clear summaries, charts, and even update or insert data โ all through one smart agent powered by n8nโs Model Context Protocol (MCP). Supports: - Multi-KPI insights in one prompt - Auto-generated QuickChart bar/pie charts - Natural-language inserts and updates - Markdown-friendly output for dashboards --- ๐ Why This Version Stands Out This version goes beyond reporting: - ๐ Auto-generates charts (QuickChart) - ๐งฎ Answers multiple KPIs i

Ask your PostgreSQL database complex questions and receive clear summaries, charts, and even update or insert data โ all through one smart agent powered by n8nโs Model Context Protocol (MCP). Supports: - Multi-KPI insights in one prompt - Auto-generated QuickChart bar/pie charts - Natural-language inserts and updates - Markdown-friendly output for dashboards --- ๐ Why This Version Stands Out This version goes beyond reporting: - ๐ Auto-generates charts (QuickChart) - ๐งฎ Answers multiple KPIs in one message - โ๏ธ Add and update records securely - ๐ง Uses up to 30 planned steps for smart reasoning ๐ฐ Estimated cost per run: $0.02 --- ๐ฌ Example Output --- ๐งฐ Key Components - MCP Server Trigger โ Receives natural queries - Claude 3.5 Haiku โ Plans, reasons, splits tasks - DeepSeek โ SQL and QuickChart generation - checkdatabase subflow โ Validates SQL - Plot Tool โ Converts data to QuickChart URLs - Insert/Update nodes โ Edits PostgreSQL records - Markdown Formatter โ Combines output into readable message --- ๐ค Model Configuration Notes This workflow uses two models: 1. Claude 3.5 Haiku (Anthropic) Used as the MCP agent for reasoning, planning, and tool calling. Claude is the native model for MCP and delivers reliable results in fewer steps. 2. DeepSeek Used in: - checkdatabase for SQL generation - Plot Tool for QuickChart JSON generation ๐ง All models are modular โ you can plug in OpenAI, Gemini, or Mistral if desired. --- ๐ Security by Design - No raw SQL from user input - Fully parameterized queries - Structured tool calling with validation - Safe output format (text + chart links) --- ๐งช Try This Prompt > โShow me top 5 products by revenue, revenue per month chart, and best customers.โ Expected output: - 3 KPIs - Multiple SQL queries - 2โ3 QuickChart links - Markdown summary for dashboard/Slack --- ๐ How to Use 1. Import: - BuildyourownPostgreSQLMCPservervisualscapable.json - checkdatabase.json - Plottool.json 2. Create your PostgreSQL credential under โCredentialsโ in n8n: - Must match the name used in the workflow (e.g., Postgres account 3) 3. Assign AI models: - Claude 3.5 Haiku โ MCP agent (Claude 3.5 MCP Agent) - DeepSeek โ LLM nodes inside checkdatabase and Plot Tool 4. Trigger the workflow using the URL from the MCP Server Trigger node (e.g., in a chatbot, HTTP request, or Webhook UI) --- ๐ฆ End-User Setup Guide If you're using this template for the first time, follow these exact steps: 1. Go to your n8n dashboard and import all three workflows (main + subflows) 2. Create a PostgreSQL credential using your host, database, user, and password 3. Go to the Claude and DeepSeek nodes, and connect them to your account(s) 4. Use the Webhook URL in the MCP Server Trigger to connect your chatbot or frontend 5. Send a prompt like: โShow me revenue per month, top 5 products, and a chart of best customers.โ Optional: - You can increase the MCP Agentโs MaxIterations to go deeper (default is 30) - You can use Switch nodes to limit access to certain tables or actions - Insert/Update nodes are already included and can be safely enabled โ Once this is done, your AI assistant will: - Read from your database - Visualize data via QuickChart - Insert or update rows - Respond in clear, markdown-formatted summaries --- ๐ More Templates by the Same Creator 1. PostgreSQL Conversational Agent with Claude & DeepSeek (Multi-KPI, Secure) 2. Conversing with Data: Transforming Text into SQL Queries and Visual Curves 3. Customer Feedback Analysis with AI, QuickChart & HTML Report Generator
Download the workflow JSON file after purchase.
Open n8n โ click the menu โ Import from File.
Select the downloaded JSON and import.
Set up credentials for each node that requires them.
Click Execute Workflow to test, then activate.
Setup guide included
Purchase to unlock the full step-by-step guide
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.