Skip to content
FlowHubFluxonLab
A
AI Automationfree

Chat with Postgresql Database

by KumoHQadapted from n8n official workflow galleryUpdated Aug 2026
RequiresAAI AgentOpenAI Chat ModelOpenAI Chat ModelSSimple Memory
Share Post Share
ChWhen chat message receivedWhen chat messa…AgAI AgentOpenAI Chat ModelOpenAI Chat Mod…PTGet Table DefinitionGet Table Defin…MBChat HistoryPTExecute SQL QueryExecute SQL Que…PTGet DB Schema and Tables ListGet DB Schema a…123456
1/5
STEPS · 6
Starts from a chat message

Who is this template for? This workflow template is designed for any professionals seeking relevent data from database using natural language. How it works Each time user ask's question using the n8n chat interface, the workflow runs. Then the message is processed by AI Agent using relevent tools - Execute SQL Query, Get DB Schema and Tables List and Get Table Definition, if required. Agent uses these tool to form and run sql query which are necessary to answer the questions. Once AI Agent has the data, it uses it to form answer and returns it to the user. Set up instructions Complete the Set up credentials step when you first open the workflow. You'll need a Postgresql Credentials, and OpenAI api key.

Tags

n8nreference-onlyagentlm-chat-open-aimemory-buffer-window
Connects
AAI AgentopenaichatmodelOpenAI Chat ModelSSimple Memory
CategoryAI Automation
Triggermanual
Complexitymedium
Nodes7
AddedFeb 7, 2025

Related workflows

See all AI Automation
AopenaichatmodelserpapigooglesearchS
free

AI chatbot that can search the web

This workflow is designed for dynamic and intelligent conversational capabilities. It incorporates OpenAI's GPT-4o model for natural language understanding and generation. Additional tools include SerpAPI and Wikipedia for enriched, data-driven responses. The workflow is triggered manually, and utilizes a 'Window Buffer Memory' to maintain the context of the last 20 interactions for better conversational continuity. All these components are orchestrated through n8n nodes, ensuring seamless interconnectivity. To use this template, you need to be on n8n version 1.50.0 or later.

by n8n Team
AopenaichatmodelserpapigooglesearchS
free

AI agent chat

This workflow employs OpenAI's language models and SerpAPI to create a responsive, intelligent conversational agent. It comes equipped with manual chat triggers and memory buffer capabilities to ensure seamless interactions. To use this template, you need to be on n8n version 1.50.0 or later.

by n8n Team
AopenaichatmodelserpapigooglesearchS
free

Slack chatbot powered by AI

This workflow offers an effective way to handle a chatbot's functionality, making use of multiple tools for information retrieval, conversation context storage, and message sending. It's a setup tailored for a Slack environment, aiming to offer an interactive, AI-driven chatbot experience. Note that to use this template, you need to be on n8n version 1.19.4 or later.

by n8n Team