AI Agents
AI agent to chat with Supabase PostgreSQL
11 nodes
209
146
Automatic trigger
Workflow Description
An AI agent that interfaces with Supabase PostgreSQL database through natural language conversation. Users ask questions in plain text, and the agent queries the database intelligently, returning formatted results in real-time chat format.
How it works
- 1.Capture user message through Chat Trigger interface
- 2.Parse user intent using OpenAI's language model
- 3.Generate and execute appropriate SQL query via Postgres Tool
- 4.Retrieve results from PostgreSQL database
- 5.Format and deliver response back to user in conversation
Use cases
- Query customer information and order history using conversational language
- Extract analytics and generate reports from database without writing SQL queries
Requirements
- Active Supabase project with configured PostgreSQL database
- OpenAI API key with permission for chat completion models
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Chat Trigger
OpenAI
Postgres
AI Agent
Details
Trigger
Automatic trigger
Nodes
11
Apps
4
Views
209
Downloads
146
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (11)
/
Sticky Note3
Sticky Note
Sticky Note5
Sticky Note
Sticky Note6
Sticky Note
Sticky Note7
Sticky Note
When chat message received
Chat Trigger
OpenAI Chat Model
OpenAI
DB Schema
Postgres Tool
Get table definition
Postgres Tool
Sticky Note
Sticky Note
AI Agent
Agent
Run SQL Query
Postgres Tool