← All N8N workflows
AI & researchAgentChat TriggerExecute Workflow TriggerHTTP RequestOpenAI Chat Model

✨📊Multi-AI Agent Chatbot for Postgres/Supabase DB and QuickCharts + Tool Router

Configured with Agent, Chat Trigger, Execute Workflow Trigger, HTTP Request, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen chat messagereceivedChat TriggerData storeExecute SQL QueryPostgres ToolTriggerWhen Executed byAnother WorkflowExecute Workflow TriggerSubworkflowquery_db_toolTool WorkflowSubworkflowgenerate_quickchart_toolTool WorkflowWeb / APICreate QuickChartHTTP RequestTransformQuickChart ObjectSchemaOutput Parser StructuredAI & modelsgpt-4o-miniOpenAI Chat ModelAI & modelsgpt-4o-mini-2OpenAI Chat ModelAI & models🤖Primary AgentAgentAI & models🤖Secondary PostgresAgentAgentAI & models🤖Secondary QuickChartAgentAgentRouting🔀Tool Agent RouterSwitchData storeTable DefinitionsPostgres ToolData storePostgres Chat MemoryMemory Postgres ChatTransformFinal QuickChart URLEdit FieldsTransformQuickChart GET URLEdit FieldsData storeDB Schema and TablesPostgres ToolAI & modelsgpt-40-mini-1OpenAI Chat Model

Node categories in this workflow

  • Trigger
  • Data store
  • Subworkflow
  • Web / API
  • Transform
  • AI & models
  • Routing

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When chat message receivedTriggerChat TriggerSee node parameters
Execute SQL QueryData storePostgres ToolexecuteQuery
When Executed by Another WorkflowTriggerExecute Workflow TriggerSee node parameters
query_db_toolSubworkflowTool WorkflowSee node parameters
generate_quickchart_toolSubworkflowTool WorkflowSee node parameters
Create QuickChartWeb / APIHTTP RequestSee node parameters
QuickChart Object SchemaTransformOutput Parser StructuredSee node parameters
gpt-4o-miniAI & modelsOpenAI Chat ModelSee node parameters
gpt-4o-mini-2AI & modelsOpenAI Chat ModelSee node parameters
🤖Primary AgentAI & modelsAgentSee node parameters
🤖Secondary Postgres AgentAI & modelsAgentSee node parameters
🤖Secondary QuickChart AgentAI & modelsAgentSee node parameters
🔀Tool Agent RouterRoutingSwitchSee node parameters
Table DefinitionsData storePostgres ToolexecuteQuery
Postgres Chat MemoryData storeMemory Postgres ChatSee node parameters
Final QuickChart URLTransformEdit FieldsSee node parameters
QuickChart GET URLTransformEdit FieldsSee node parameters
DB Schema and TablesData storePostgres ToolexecuteQuery
gpt-40-mini-1AI & modelsOpenAI Chat ModelSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • openAiApi
  • postgres

Workflow notes

Setup

Setup

  1. Create a Postgres compatible database (Supabase)

  2. Add your Postgres and OpenAI credentials

  3. Click Chat button and start chatting with your database and creating QuickChart to visualize the results

Postgres Tools Used

Postgres Tools Used

  1. Execute SQL Query Used to execute any query generated by the agent.

  2. DB Schema and Tables Returns the list of all the tables with its schema name.

  3. Table Definition Returns table details like column names, foreign keys and more of a particular table in a schema.

Generate a Quickchart

Generate a Quickchart

Secondary QuickChart Agent Tool This section handles the chart generation process through several steps by sending the database records and user prompt to OpenAI to create a JSON object based on Chart.js and QuickChart.io definitions

QuickChart GET URL node This sections adds chart definitions to a QuickChart.io URL

Create QuickChart node This sections sends chart queries to QuickCharts with a defined JSON format

This integration allows you to dynamically generate charts based on data queries, with AI assistance for formatting and optimization.

QuickChart Schema

QuickChart Schema

Adjust the QuickChart Schema to match your use case.

https://quickchart.io/documentation/

Chart Size

Chart Size

Adjust the chart size in the QuickChart GET URL node.

✨📊Multi-AI Agent Chatbot for Postgres/Supabase DB and QuickCharts + Tool Router

✨📊Multi-AI Agent Chatbot for Postgres/Supabase DB and QuickCharts + Tool Router

Purpose and structure

This folder contains the ✨📊Multi-AI Agent Chatbot for Postgres/Supabase DB and QuickCharts + Tool Router workflow. Its executable nodes use agent, chatTrigger, executeWorkflowTrigger, httpRequest, lmChatOpenAi, memoryPostgresChat, outputParserStructured, postgresTool, set, switch, toolWorkflow. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

When chat message received, When Executed by Another Workflow

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Http/1558_HTTP_Stickynote_Automate_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • 🤖Primary AI Manager Agent
  • QuickChart Tool
  • Postgres Tool
  • LLM
  • Chat Memory
  • 👍Start Here
  • ⚒️🤖Secondary Postgres Tool Agent
  • Tool Agent Router 🔀
  • ⚒️🤖Secondary QuickChart Tool Agent
  • ✨📊Multi-AI Agent Chatbot for Postgres/Supabase DB and QuickCharts + Tool Router

More in AI & research