Generate SQL queries from schema only - AI-powered
29 nodes · lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile
- Engine
- n8n
- Nodes
- 29
- Trigger
- scheduled/triggered
- Source file
- 1590_Extractfromfile_Converttofile_Create_Triggered.json
Workflow flow
OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
Window Buffer Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
Chat Trigger
@n8n/n8n-nodes-langchain.chat
When clicking "Test workflow"
Manual
List all tables in a database
MySQL
Load the schema from the local file
ReadWriteFile
Extract database schema
MySQL
Extract data from file
ExtractFromFile
Add table name to output
Set
Combine schema data and chat input
Set
Convert data to binary
ConvertToFile
AI Agent
@n8n/n8n-nodes-langchain.agent
Save file locally
ReadWriteFile
Extract SQL query
Set
Check if query exists
IF
No Operation, do nothing
NoOp
Run SQL query
MySQL
Format query results
Set
Combine query result and chat answer
Merge
Prepare final output
Set
20 steps · flows top to bottom, branches left to right
Browse by integration
Browse all integrations →Import into n8n
- Download the n8n JSON file (full or sanitized).
- In n8n: Workflows → Import from file.
- Open each node and reconnect credentials to your accounts.
- Test with manual execution before enabling triggers.
Sanitized JSON removes credential IDs — safer for sharing. Flow graph JSON is OpenRuna's lightweight format for diagrams and other tools, not n8n import.
Overview
Free n8n workflow: Generate SQL queries from schema only - AI-powered. 29 nodes across lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent, with a downloadable JSON and a visual flow diagram on OpenRuna.
What this workflow does
This n8n workflow, "Generate SQL queries from schema only - AI-powered", wires together lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent in 29 nodes. 29 nodes · lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile It starts from a scheduled/triggered trigger and routes data through every node in order. On OpenRuna you get the visual graph, the integration list, and a downloadable JSON ready to import into n8n. Use it to learn integration patterns, fork it for your own use case, or deploy it quickly after reconnecting credentials.
Use cases
- Import "Generate SQL queries from schema only - AI-powered" into n8n, reconnect credentials for lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent, and run the same automation in your own workspace.
- Use it as a starting template when wiring lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent — adjust node parameters to your accounts and record IDs.
- Study how data moves from lmChatOpenAi to memoryBufferWindow before building your own variant.
- Share it with your team as a documented reference for scheduled/triggered automations in the lmChatOpenAi stack.
Example output
Imported into n8n, "Generate SQL queries from schema only - AI-powered" exposes 29 configured nodes. Trigger type: scheduled/triggered. Integrations: lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent. Set your credentials on the lmChatOpenAi node, then verify each downstream node picks them up. Run it once in test mode to verify any branch logic (Switch/IF nodes) before enabling production triggers.
Tips by platform
Claude
Ask Claude to turn the "Generate SQL queries from schema only - AI-powered" JSON into a plain-English runbook, node by node. It can flag where lmChatOpenAi rate limits or missing retries might bite before you go live.
ChatGPT
Drop the workflow JSON or this OpenRuna page URL into ChatGPT and ask for a step-by-step runbook: triggers, branches, and which fields to customise for lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent. Handy for onboarding teammates new to n8n.
Cursor
In Cursor, ask Agent mode to parameterise "Generate SQL queries from schema only - AI-powered" — extract lmChatOpenAi IDs and secrets into environment variables without changing the 29-node structure.
Frequently asked questions
- How do I import "Generate SQL queries from schema only - AI-powered" into n8n?
- Click Download n8n JSON on this page, then in n8n choose Workflows → Import from file and select the downloaded file. Reconnect credentials on each node — the export carries credential IDs from the original author's instance, not working secrets.
- Which integrations does "Generate SQL queries from schema only - AI-powered" use?
- It uses: lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent. The flow diagram above shows how each service connects across the 29 nodes. Filter OpenRuna by integration to find related workflows and tools.
- Can I import a sanitized export without credentials?
- Yes. Use "Download sanitized JSON" to strip credential references before sharing internally. You will still add your own lmChatOpenAi and memoryBufferWindow credentials in n8n after import.
- What trigger type does "Generate SQL queries from schema only - AI-powered" use?
- Trigger type: scheduled/triggered. After import, confirm the trigger node (webhook, schedule, or app event) matches your environment, then activate the workflow when you are ready to run it.
- Is "Generate SQL queries from schema only - AI-powered" free to use?
- OpenRuna catalogs community n8n workflows under open licenses. Check the source corpus link for the original license; commercial use may require verifying the third-party API terms for lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent.
Related resources
- Agent
PraisonAI
24/7 AI employee team for automating complex challenges. Low-code multi-agent framework with handoffs, guardrails, memory, RAG, and 100+ LLM providers
- Agent
Prompt Optimizer
AI prompt optimization tool with multi-round iterative improvements, dual-mode optimization for system and user prompts, and multi-model support. Available as web app, desktop app, Chrome extension, and Docker deployment. AGPL-3.0 licensed
- Agent
Archon
Workflow engine for deterministic AI coding agents. Define development processes as YAML workflows (planning → implementation → validation → review → PR) with isolated Git worktrees for parallel execution. MIT licensed
- Agent
A2A Protocol
Agent2Agent (A2A) open protocol enabling communication and interoperability between opaque agentic applications. Donated to Linux Foundation by Google with 50+ technology partners. Apache 2.0 licensed
- Agent
CAMEL
First and best multi-agent framework for building scalable agent systems. Apache 2.0 licensed with extensive tooling for agent communication and task automation
- Agent
Neuron AI
PHP Agentic Framework for building production-ready AI driven applications. Connect components (LLMs, vector DBs, memory) to agents that can interact with your data. MIT licensed
- Agent
smolagents
Lightweight agent framework centered on tool use and code-executing workflows
- Agent
Supermemory
Memory API and app for AI agents that provides fast, scalable, context-aware storage and retrieval across projects. MIT licensed
