Convert CSV/XLSX files into a normalized SQL schema with GPT-4
Ready for 3.0What this workflow does
This AI workflow has 14 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects OpenAI Chat Model.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Workflow Configuration (Edit Fields (Set)): sets 3 fields: fkOverlapThreshold, maxNormalizationDepth, minUniquePercentForPK
- Check File Type (If): checks a condition and branches into true / false
- Extract CSV Data (Extract from File): extracts data from a file
- Extract Excel Data (Extract from File): extracts data from a file (xlsx)
- Column Profiling Engine (Code): runs custom JavaScript code
- Aggregate: combines items into one
- Schema Reasoning Agent (AI Agent): runs an AI agent, with model: OpenAI GPT; output parser: Schema JSON Parser
- Rule Validator (Code): runs custom JavaScript code
- SQL Schema Generator (Code): runs custom JavaScript code
- Generate Data Dictionary & ERD (Code): runs custom JavaScript code
…plus 1 more step. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Extract from File
n8n-nodes-base.extractFromFile - Code
n8n-nodes-base.code - Aggregate
n8n-nodes-base.aggregate - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Respond to Webhook
n8n-nodes-base.respondToWebhook - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
Automatically converts CSV/XLSX files into a fully validated database schema using AI, generating SQL scripts, ERD diagrams, a data dictionary, and load plans to accelerate database design and data onboarding. --- EXPLANATION This workflow automates the…