This workflow corresponds to n8n.io template #2090 — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
ollamaApipostgres
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Chat with a database using AI. Uses chatTrigger, postgresTool, memoryBufferWindow, agent. Chat trigger; 7 nodes.
Source: https://github.com/ai-on-gke/tutorials-and-examples/blob/df226554de59e8ff8e6632abf3a852af85963f3c/n8n/workflow.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Becomex v2. Uses chatTrigger, lmChatOllama, agent, toolWorkflow. Chat trigger; 17 nodes.
NGSS Agent v2.2 github. Uses memoryBufferWindow, toolWorkflow, chatTrigger, agent. Chat trigger; 13 nodes.
Chat with Postgresql Database. Uses chatTrigger, agent, lmChatOpenAi, postgresTool. Chat trigger; 11 nodes.
Chat with Postgresql Database. Uses chatTrigger, agent, lmChatOpenAi, postgresTool. Chat trigger; 11 nodes.
This workflow template is designed for any professionals seeking relevent data from database using natural language. Each time user ask's question using the n8n chat interface, the workflow runs. Then