Generate production database schemas from Excel and CSV with OpenAI and LangChain
Ready for 3.0What this workflow does
This AI workflow has 21 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: maxRevisionAttempts, minForeignKeyOverlap, confidenceThreshold
- Check File Type (If): checks a condition and branches into true / false
- Extract Excel Data (Extract from File): extracts data from a file (xlsx)
- Extract CSV Data (Extract from File): extracts data from a file
- Merge: merges the data from its input branches
- Compute File Hash & Profile Data (Code): runs custom JavaScript code
- Column Profiling Engine (Code): runs custom JavaScript code
- Schema Reasoning Agent (AI Agent): runs an AI agent, with model: OpenAI GPT; output parser: Schema Output Parser
- Rules Validation Layer (Code): runs custom JavaScript code
- Check Validation Result (If): checks a condition and branches into true / false
…plus 7 more steps. 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 - Merge
n8n-nodes-base.merge - Code
n8n-nodes-base.code - 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
Overview This workflow automatically converts CSV or Excel files into a production-ready database schema using AI and rule-based validation. It analyzes uploaded data, detects column types, relationships, and data quality, then generates a normalized schema.…