Library / AI Agents & Assistants
AI Agents & Assistants
Chat with Postgres Using Text-to-SQL with OpenAI
When a chat message arrives, an AI agent using OpenAI or DeepSeek reads the Postgres schema, writes SQL queries, and answers questions about the data.
The steps
- Window Buffer Memory
- No Operation, do nothing
- Add table name to output
- Save file locally
- Extract data from file
- Chat Trigger
- AI Agent
- When clicking "Test workflow"
- Combine schema data and chat input
- Load the schema from the local file
- Extract SQL query
- Check if query exists
- Format query results
- Prepare final output
25 steps in total.
Similar automations