Generate SQL queries from schema only - AI-powered
n8n template #2508Summary
Use templateThis workflow is a modification of the previous template on how to create an SQL agent with LangChain and SQLite. The key difference – the agent has access only to the database schema, not to the actual data. To achieve this, SQL queries are made outside the AI Agent node, and the results are never passed back to the agent. This approach allows the agent to generate SQL queries based on the structure of tables and their relationships, without having to access the actual data. This makes the process more secure and efficient, especially in cases where data confidentiality is crucial. 🚀 Setup To get started with this workflow, you’ll need to set up a free MySQL server and import your database
Hand off to your agent
Prompt
Help me set up the n8n workflow "Generate SQL queries from schema only - AI-powered" (https://n8n.io/workflows/2508). It uses: MySQL, AI Agent, OpenAI Chat Model, Simple Memory. Import the template JSON into my n8n instance, list every credential I need to create, and walk me through testing it.
Paste into Claude Code and it will do the rest.
Apps and nodes
Similar workflows
NameViews
- AI agent chat780K
- Building Your First WhatsApp Chatbot332K
- Angie, personal AI assistant with Telegram voice and text326K
- Build Your First AI Data Analyst Chatbot134K
- Create a Branded AI-Powered Website Chatbot88K
- Conversational Telegram Bot with GPT-5/GPT-4o for Text and Voice Messages82K
- Chat with Postgresql Database74K
- AI chatbot that can search the web72K