Chat with a database using AI: n8n template
Chat with a database using AI is a free n8n workflow template by David Roberts with 5 nodes. It starts with the Chat Trigger node ("When chat message received") and uses Postgres Tool, Memory Buffer Window, AI Agent and OpenAI Chat Model. You can paste it into your n8n editor in one click with FlowLume.
What this workflow does, step by step
- When chat message received (Chat Trigger node)
- AI Agent
- Postgres (Postgres Tool node)
- Simple Memory (Memory Buffer Window node)
- OpenAI Chat Model
What you need before you paste it
Connect these accounts in n8n
- OpenAI · used by OpenAI Chat Model
- Postgres · used by Postgres
Checked with FlowLume's setup checklist on 2026-11-25. In the extension, FlowLume Pro shows this checklist for any template before you paste.
Template facts
- Author
- David Roberts (verified n8n creator)
- Nodes
- 5
- Apps
- Chat Trigger, Postgres Tool, Memory Buffer Window, AI Agent, OpenAI Chat Model
- Uses AI
- Yes (n8n AI nodes)
- Categories
- Internal Wiki, AI RAG
- Views on n8n.io
- 356,051
- Published
- 13 February 2024
- Price
- Free
How to paste it with FlowLume
- Install FlowLume. Add the free FlowLume extension to Google Chrome from the Chrome Web Store.
- Open n8n. Open a new or existing workflow in your n8n editor (n8n Cloud or self-hosted).
- Find the template. Click the FlowLume button at the bottom right and search for "Chat with a database using AI".
- Paste it. Click Paste to n8n. All nodes and connections land on your canvas.
- Connect your accounts. Add your own credentials for OpenAI, Postgres, then run the workflow.
Similar n8n templates
- Chat with Postgresql databaseChat Trigger · AI Agent · OpenAI Chat Model · Postgres Tool
- Chat with a Google Sheet using AIChat Trigger · OpenAI Chat Model · Memory Buffer Window · AI Agent
- AI agent chatChat Trigger · OpenAI Chat Model · Http Request Tool · AI Agent
- AI agent that can scrape webpagesChat Trigger · AI Agent · OpenAI Chat Model · HTTP Request
- Create a branded AI-powered website chatbotOpenAI Chat Model · HTTP Request Tool · HTTP Request · Chat Trigger
- Build Your First AI Data Analyst ChatbotChat Trigger · AI Agent · OpenAI Chat Model · HTTP Request
Template "Chat with a database using AI" by David Roberts, published on n8n.io. The template and its description belong to its author; this page only summarises its structure. FlowLume is an independent tool by DrakenLume and is not affiliated with n8n GmbH. n8n is a trademark of n8n GmbH.