OpenRuna
Sign in
← Workflows

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
1472_Extractfromfile_Converttofile_Create_Triggered.json

Workflow flow

IntegrationsLmChatOpenAiMemoryBufferWindowMySQLConvertToFileReadWriteFileExtractFromFileChatAgentManual@n8n/n8n-nodes-langchain.lmChatOpenAi@n8n/n8n-nodes-langchain.memoryBufferWindowNoOp+5 more
100%

OpenAI Chat Model

@n8n/n8n-nodes-langchain.lmChatOpenAi

Window Buffer Memory

@n8n/n8n-nodes-langchain.memoryBufferWindow

TRIGGER

Chat Trigger

@n8n/n8n-nodes-langchain.chat

TRIGGER

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

  1. Download the n8n JSON file (full or sanitized).
  2. In n8n: Workflows → Import from file.
  3. Open each node and reconnect credentials to your accounts.
  4. 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.

View source corpus ↗

Overview

Generate SQL queries from schema only - AI-powered is a free n8n workflow on OpenRuna — 29 nodes connecting lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent. Download the JSON, view the flow diagram, and import it into your n8n instance.

What this workflow does

"Generate SQL queries from schema only - AI-powered" automates a lmChatOpenAi-to-memoryBufferWindow flow in n8n across 29 nodes. 29 nodes · lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile A scheduled/triggered entry point kicks it off, and each node passes data to the next until the run completes. 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

  • Share it with your team as a documented reference for scheduled/triggered automations in the lmChatOpenAi stack.
  • Study how data moves from lmChatOpenAi to memoryBufferWindow before building your own variant.
  • 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.
  • 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.

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. Open each node after import to map credentials to your own lmChatOpenAi and memoryBufferWindow accounts. Run it once in test mode to verify any branch logic (Switch/IF nodes) before enabling production triggers.

Tips by platform

Claude

Paste the exported JSON for "Generate SQL queries from schema only - AI-powered" into Claude and ask it to explain each of the 29 nodes. Claude is good at suggesting credential mappings for lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent, plus error-handling and idempotency improvements before you run it in production.

ChatGPT

Have ChatGPT generate a checklist for adapting "Generate SQL queries from schema only - AI-powered" to your accounts — which lmChatOpenAi, memoryBufferWindow, mySql, convertToFile, readWriteFile, extractFromFile, chat, agent credentials to create and which node parameters to change first.

Cursor

Open the downloaded JSON in Cursor and use Agent mode to refactor hard-coded URLs into env vars, or to generate tests for any Code nodes. Keep the OpenRuna flow diagram open so you do not break connection order across the 29 nodes.

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