Generate Complete Database Schemas with Claude for SQL Databases
Ready for 3.0What this workflow does
This AI workflow has 20 nodes and runs when someone submits an n8n form (“AI Database Architect - By Evervise”). Along the way it connects Anthropic Chat Model and Postgres.
How it runs
Trigger: When someone submits an n8n form (“AI Database Architect - By Evervise”).
- Initialize Variables (Edit Fields (Set)): sets 3 fields: iteration_count, previous_feedback, form_data
- Agent 1: Database Architect (AI Agent): runs an AI agent, with model: Architect Model
- Agent 2: Schema Reviewer (AI Agent): runs an AI agent, with model: Reviewer Model
- Agent 3: Optimizer & Scorer (AI Agent): runs an AI agent, with model: Optimizer Model
- Is Score A or B? (If): checks a condition and branches into true / false
- Agent 4: Generate SQL Script (AI Agent): runs an AI agent, with model: SQL Generator Model
- Track Iteration (Edit Fields (Set)): sets 3 fields: iteration_count, previous_feedback, form_data
- If: checks a condition and branches into true / false
- Can Retry? (If): checks a condition and branches into true / false
- Execute SQL in PostgreSQL (Postgres): run a query
…plus 5 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 (7)
- Edit Fields (Set)
n8n-nodes-base.set - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - AI Agent
@n8n/n8n-nodes-langchain.agent - If
n8n-nodes-base.if - n8n Form
n8n-nodes-base.form - Postgres
n8n-nodes-base.postgres - n8n Form Trigger
n8n-nodes-base.formTrigger
From the author
Transform database design from weeks to minutes with this intelligent multi-agent system. Perfect for agencies, consultancies, and SaaS companies offering database architecture as a lead magnet or service. 🤖 4 Specialized AI Agents: - Agent 1 (Architect):…