New: FlowLume Pro · version snapshots, handoff docs, full backups and more. One payment, yours for life. See Pro

Generate SQL queries from schema only - AI-powered: n8n template

Generate SQL queries from schema only - AI-powered is a free n8n workflow template by Yulia with 20 nodes. It starts with the Chat Trigger node ("Chat Trigger") and uses OpenAI Chat Model, MySQL and AI Agent. You can paste it into your n8n editor in one click with FlowLume.

What this workflow does, step by step

  1. Chat Trigger
  2. When clicking "Test workflow" (Manual Trigger node)
  3. Load the schema from the local file (Read/Write Files from Disk node)
  4. List all tables in a database (MySQL node)
  5. Extract data from file (Extract from File node)
  6. Extract database schema (MySQL node)
  7. Combine schema data and chat input (Edit Fields (Set) node)
  8. Add table name to output (Edit Fields (Set) node)
  9. AI Agent
  10. Convert data to binary (Convert to File node)
  11. Extract SQL query (Edit Fields (Set) node)
  12. OpenAI Chat Model
  13. Window Buffer Memory (Simple Memory node)
  14. Save file locally (Read/Write Files from Disk node)

The full workflow has 20 nodes; this list shows the main path from the trigger.

What you need before you paste it

Connect these accounts in n8n

  • MySQL · used by List all tables in a database, Extract database schema, Run SQL query
  • OpenAI · used by OpenAI Chat Model

Checked with FlowLume's setup checklist on 2026-11-25. In the extension, FlowLume Pro shows this checklist for any template before you paste.

Template facts

Author
Yulia (verified n8n creator)
Nodes
20
Apps
OpenAI Chat Model, MySQL, Chat Trigger, AI Agent
Uses AI
Yes (n8n AI nodes)
Categories
Engineering, AI Chatbot
Views on n8n.io
38,321
Published
30 October 2024
Price
Free

How to paste it with FlowLume

  1. Install FlowLume. Add the free FlowLume extension to Google Chrome from the Chrome Web Store.
  2. Open n8n. Open a new or existing workflow in your n8n editor (n8n Cloud or self-hosted).
  3. Find the template. Click the FlowLume button at the bottom right and search for "Generate SQL queries from schema only - AI-powered".
  4. Paste it. Click Paste to n8n. All nodes and connections land on your canvas.
  5. Connect your accounts. Add your own credentials for MySQL, OpenAI, then run the workflow.
Add FlowLume to Chrome, free

Similar n8n templates

Template "Generate SQL queries from schema only - AI-powered" by Yulia, published on n8n.io. The template and its description belong to its author; this page only summarises its structure. FlowLume is an independent tool by DrakenLume and is not affiliated with n8n GmbH. n8n is a trademark of n8n GmbH.