Templates / Convert CSV/XLSX files into a normalized SQL schema with GPT-4

Convert CSV/XLSX files into a normalized SQL schema with GPT-4

Ready for 3.0

by ResilNext ✓ · 102 views · created 2026-03-25 · Document Extraction, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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.

  1. Workflow Configuration (Edit Fields (Set)): sets 3 fields: fkOverlapThreshold, maxNormalizationDepth, minUniquePercentForPK
  2. Check File Type (If): checks a condition and branches into true / false
  3. Extract CSV Data (Extract from File): extracts data from a file
  4. Extract Excel Data (Extract from File): extracts data from a file (xlsx)
  5. Column Profiling Engine (Code): runs custom JavaScript code
  6. Aggregate: combines items into one
  7. Schema Reasoning Agent (AI Agent): runs an AI agent, with model: OpenAI GPT; output parser: Schema JSON Parser
  8. Rule Validator (Code): runs custom JavaScript code
  9. SQL Schema Generator (Code): runs custom JavaScript code
  10. Generate Data Dictionary & ERD (Code): runs custom JavaScript code

…plus 1 more step. See the full node list below.

Services it uses

OpenAI Chat Model

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)

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…

Excerpt from ResilNext's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.