Génération d'un schéma de base de données complet pour les bases de données SQL avec un système multi-agent Claude
Avancé
Ceci est uncontenant 31 nœuds.Utilise principalement des nœuds comme If, Set, Form, Postgres, FormTrigger. Utiliser le système multi-agents Claude pour générer un schéma de base de données complet pour une base de données SQL
Prérequis
- •Informations de connexion à la base de données PostgreSQL
- •Clé API Anthropic
Nœuds utilisés (31)
Catégorie
-
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
"nodes": [
{
"id": "6372d515-3314-4ca8-acf4-462fb4e2fbb1",
"name": "Initialiser les variables",
"type": "n8n-nodes-base.set",
"position": [
-832,
-3104
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "init_iteration",
"name": "iteration_count",
"type": "number",
"value": 0
},
{
"id": "init_feedback",
"name": "previous_feedback",
"type": "string",
"value": "="
},
{
"id": "form_data",
"name": "form_data",
"type": "object",
"value": "={{ $json }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "e102d0ff-e176-49b5-a999-a3ccf2fb7f42",
"name": "Modèle d'architecte",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
-480,
-2880
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-5-20250929",
"cachedResultName": "Claude Sonnet 4.5"
},
"options": {
"topP": 0.9,
"temperature": 0.3
}
},
"credentials": {
"anthropicApi": {
"id": "rFsH3A7ko19Tb8xL",
"name": "Anthropic account"
}
},
"typeVersion": 1.3
},
{
"id": "1648a9d6-a261-45b8-8dc9-516fd62a7a3e",
"name": "Modèle de réviseur",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
-64,
-2944
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-5-20250929",
"cachedResultName": "Claude Sonnet 4.5"
},
"options": {
"topP": 0.85,
"temperature": 0.1
}
},
"credentials": {
"anthropicApi": {
"id": "rFsH3A7ko19Tb8xL",
"name": "Anthropic account"
}
},
"typeVersion": 1.3
},
{
"id": "87d374f8-babb-41f5-ac5c-f45be51df90c",
"name": "Modèle d'optimiseur",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
320,
-2928
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-5-20250929",
"cachedResultName": "Claude Sonnet 4.5"
},
"options": {
"topP": 0.95,
"temperature": 0.5
}
},
"credentials": {
"anthropicApi": {
"id": "rFsH3A7ko19Tb8xL",
"name": "Anthropic account"
}
},
"typeVersion": 1.3
},
{
"id": "a5028fd9-b726-413b-86aa-9f3735395bb9",
"name": "Agent 1 : Architecte de base de données",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-544,
-3120
],
"parameters": {
"text": "=Database Requirements:\n- What they're building: {{ $json.form_data['What are you building?'] }}\n- Database Technology: {{ $json.form_data['Database Technology'] }}\n- Industry: {{ $json.form_data['Industry/Niche'] }}\n- Data to track: {{ $json.form_data['What data do you need to track?'] }}\n- Team size: {{ $json.form_data['Team Size'] }}\n- Expected scale: {{ $json.form_data['Expected Scale'] }}\n- Key workflows: {{ $json.form_data['Key Workflows'] }}\n- Integrations: {{ $json.form_data['Any integrations needed?'] }}\n- Special requirements: {{ $json.form_data['Special Requirements'] }}\n\n{{ $json.previous_feedback ? '⚠️ PREVIOUS DESIGN HAD ISSUES - ITERATION ' + ($json.iteration_count + 1) + '/3:\\n\\nPrevious Feedback:\\n' + $json.previous_feedback + '\\n\\nPlease redesign the schema addressing ALL the concerns mentioned above. Focus especially on CRITICAL and HIGH priority items.\\n\\n' : '' }}\n\nPlease design a complete {{ $json.form_data['Database Technology'] }} database schema for this use case. Output your design as structured JSON.",
"options": {
"systemMessage": "=You are a senior {{ $json.form_data['Database Technology'] }} database architect with 15+ years experience.\nYou design production-grade schemas that are scalable, normalized, and follow best practices. You consider performance, indexing, and future growth.\n\nOutput your design as structured JSON with:\n- tables: Array of table objects with:\n - name: string\n - columns: Array of {name, type, constraints, description}\n - primary_key: string or array\n - indexes: Array of {name, columns, type}\n - foreign_keys: Array of {column, references_table, references_column}\n- enums: Array of {name, values}\n- extensions: Array of extension names needed\n- relationships: Description of how tables relate\n- reasoning: Explanation for key design decisions\n\nBe thorough and production-ready. Consider the scale and requirements carefully."
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "58921f8a-0b6f-460b-8202-69327c364d45",
"name": "Agent 2 : Réviseur de schéma",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-144,
-3120
],
"parameters": {
"text": "=Original Requirements:\n{{ JSON.stringify($('Initialize Variables').item.json.form_data, null, 2) }}\n\nProposed Schema from Agent 1:\n{{ $('Agent 1: Database Architect').item.json.output }}\n\nPlease conduct a thorough review of this database schema design. Check for issues in normalization, indexing, data types, constraints, performance, scalability, and security.\n\nOutput structured feedback with severity levels: CRITICAL, HIGH, MEDIUM, LOW",
"options": {
"systemMessage": "You are a {{ $('Initialize Variables').item.json.form_data['Database Technology'] }} code reviewer and database optimization expert.\nYour job is to find issues, enforce best practices, and ensure production-readiness.\n\nReview checklist:\n- Normalization (3NF minimum, appropriate denormalization)\n- Indexing strategy (missing indexes? over-indexing?)\n- Data types (appropriate choices for the database type)\n- Constraints (missing NOT NULL? need CHECK constraints?)\n- Performance (N+1 query risks? missing composite indexes?)\n- Scalability (will this work at 10x, 100x scale?)\n- Security (sensitive data? need encryption? row-level security?)\n- Missing common fields (created_at, updated_at, soft deletes)\n- Relationships properly defined\n\nOutput structured feedback in this format:\n\nCRITICAL Issues:\n- [Issue 1]\n- [Issue 2]\n\nHIGH Priority:\n- [Issue 1]\n\nMEDIUM Priority:\n- [Issue 1]\n\nLOW Priority / Suggestions:\n- [Issue 1]\n\nPositive Aspects:\n- [Good thing 1]\n\nBe thorough but fair. If the design is solid, say so."
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "4e2a9518-4587-4ffe-a4a0-3f771019f22e",
"name": "Agent 3 : Optimiseur et évaluateur",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
272,
-3120
],
"parameters": {
"text": "=Original Requirements:\n{{ JSON.stringify($('Initialize Variables').item.json.form_data, null, 2) }}\n\nProposed Schema:\n{{ $('Agent 1: Database Architect').item.json.output }}\n\nReview Feedback:\n{{ $('Agent 2: Schema Reviewer').item.json.output }}\n\nPlease:\n1. Apply final polish and optimizations to the schema\n2. Add advanced features (materialized views, helper functions, useful views)\n3. Provide monitoring recommendations\n4. Create a comprehensive score card\n5. Generate implementation guidance\n\nScore each dimension 0-10 with justification. Be honest but constructive.",
"options": {
"systemMessage": "You are a {{ $('Initialize Variables').item.json.form_data['Database Technology'] }} performance optimizer and database strategist.\nApply final polish, add advanced features, and score the design holistically.\n\nAdd:\n- Performance optimizations (materialized views, covering indexes, partitioning if needed)\n- Developer experience improvements (useful views, helper functions)\n- Monitoring recommendations (what to track in production)\n- Migration strategy (how to deploy safely)\n- Backup and disaster recovery considerations\n\nCreate a comprehensive score card:\n\n📊 DATABASE ARCHITECTURE SCORE\n\nOverall Grade: [A+, A, A-, B+, B, B-, C+, C, C-, D, F] ([score]/100)\n\nDetailed Scores:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\nSchema Design: [X]/10\n[Brief justification]\n\nPerformance: [X]/10\n[Brief justification]\n\nScalability: [X]/10\n[Brief justification]\n\nDeveloper Experience: [X]/10\n[Brief justification]\n\nProduction Readiness: [X]/10\n[Brief justification]\n\nSecurity: [X]/10\n[Brief justification]\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n💪 Key Strengths:\n• [Strength 1]\n• [Strength 2]\n• [Strength 3]\n\n⚠️ Recommended Improvements:\n• [Improvement 1]\n• [Improvement 2]\n\n🚀 Next Steps:\n1. [Step 1]\n2. [Step 2]\n3. [Step 3]\n\nScore fairly but be honest. Grade A/B means production-ready, C means needs work, D/F means major issues."
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "0b898ea5-9799-4b59-b26b-0b0521a8e2c6",
"name": "Suivre l'itération",
"type": "n8n-nodes-base.set",
"position": [
608,
-2896
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "iteration",
"name": "iteration_count",
"type": "number",
"value": "={{ $('Initialize Variables').item.json.iteration_count + 1 }}"
},
{
"id": "feedback",
"name": "previous_feedback",
"type": "string",
"value": "={{ $('Agent 3: Optimizer & Scorer').item.json.output }}"
},
{
"id": "form_data_passthrough",
"name": "form_data",
"type": "object",
"value": "={{ $('Initialize Variables').item.json.form_data }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "21ea3c45-a89d-4f45-b044-958be52b13be",
"name": "SQL Modèle générateur",
"type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
"position": [
1248,
-2944
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "claude-sonnet-4-5-20250929",
"cachedResultName": "Claude Sonnet 4.5"
},
"options": {
"topP": 0.85,
"temperature": 0.2
}
},
"credentials": {
"anthropicApi": {
"id": "rFsH3A7ko19Tb8xL",
"name": "Anthropic account"
}
},
"typeVersion": 1.3
},
{
"id": "739b10a8-f533-403f-b71f-9095d982b669",
"name": "Agent 4 : Générer le script SQL",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1232,
-3200
],
"parameters": {
"text": "=Database Technology: {{ $('Initialize Variables').item.json.form_data['Database Technology'] }}\n\nFinal Approved Schema:\n{{ $('Agent 1: Database Architect').item.json.output }}\n\nOptimizations and Enhancements:\n{{ $('Agent 3: Optimizer & Scorer').item.json.output }}\n\nPlease generate a complete, production-ready SQL migration script for {{ $('Initialize Variables').item.json.form_data['Database Technology'] }}.\n\nOutput ONLY the SQL script, no markdown formatting, no additional commentary.",
"options": {
"systemMessage": "=You are a {{ $('Initialize Variables').item.json.form_data['Database Technology'] }} SQL script generator.\n\nTake the database schema design and convert it into a complete, production-ready SQL migration script.\n\nYour output must:\n- Start with proper transaction handling (BEGIN; ... COMMIT;)\n- Include all necessary extensions (for PostgreSQL)\n- Create ENUMs before tables that use them\n- Create tables in correct dependency order (referenced tables first)\n- Add all indexes after table creation\n- Add all constraints and triggers\n- Include helpful comments explaining complex parts\n- Be idempotent where possible (IF NOT EXISTS clauses)\n- End with a commented-out rollback script\n\nFormat:\n-- ============================================\n-- Database Migration Script\n-- Generated: [timestamp]\n-- Database: {{ $('Initialize Variables').item.json.form_data['Database Technology'] }}\n-- ============================================\n\nBEGIN;\n\n[Your SQL here]\n\nCOMMIT;\n\n-- ============================================\n-- ROLLBACK SCRIPT (commented out)\n-- ============================================\n-- BEGIN;\n-- [DROP statements in reverse order]\n-- COMMIT;\n\nOutput ONLY the SQL script. No markdown code blocks, no explanations."
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "509218a4-3447-49f9-a8bc-b789ba3432ec",
"name": "Réponse de succès",
"type": "n8n-nodes-base.set",
"position": [
2320,
-3312
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "status",
"name": "execution_status",
"type": "string",
"value": "success"
},
{
"id": "message",
"name": "message",
"type": "string",
"value": "✅ Database created successfully!"
},
{
"id": "sql_script",
"name": "sql_script",
"type": "string",
"value": "={{ $('Agent 4: Generate SQL Script').item.json.output }}"
},
{
"id": "schema_design",
"name": "schema_design",
"type": "string",
"value": "={{ $('Agent 1: Database Architect').item.json.output }}"
},
{
"id": "review_feedback",
"name": "review_feedback",
"type": "string",
"value": "={{ $('Agent 2: Schema Reviewer').item.json.output }}"
},
{
"id": "score_card",
"name": "score_card",
"type": "string",
"value": "={{ $('Agent 3: Optimizer & Scorer').item.json.output }}"
},
{
"id": "iterations",
"name": "iterations_needed",
"type": "number",
"value": "={{ $('Initialize Variables').item.json.iteration_count }}"
},
{
"id": "database_tech",
"name": "database_technology",
"type": "string",
"value": "={{ $('Initialize Variables').item.json.form_data['Database Technology'] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "fa2b059f-7347-4c81-a194-4e7b02e0a033",
"name": "Réponse d'erreur",
"type": "n8n-nodes-base.set",
"position": [
2320,
-3088
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "status",
"name": "execution_status",
"type": "string",
"value": "failed"
},
{
"id": "message",
"name": "message",
"type": "string",
"value": "⚠️ SQL script generated but execution failed. You can still use the script manually."
},
{
"id": "error",
"name": "sql_error",
"type": "string",
"value": "={{ $('Execute SQL in PostgreSQL').item.json.error }}"
},
{
"id": "sql_script",
"name": "sql_script",
"type": "string",
"value": "={{ $('Agent 4: Generate SQL Script').item.json.output }}"
},
{
"id": "schema_design",
"name": "schema_design",
"type": "string",
"value": "={{ $('Agent 1: Database Architect').item.json.output }}"
},
{
"id": "review_feedback",
"name": "review_feedback",
"type": "string",
"value": "={{ $('Agent 2: Schema Reviewer').item.json.output }}"
},
{
"id": "score_card",
"name": "score_card",
"type": "string",
"value": "={{ $('Agent 3: Optimizer & Scorer').item.json.output }}"
},
{
"id": "iterations",
"name": "iterations_needed",
"type": "number",
"value": "={{ $('Initialize Variables').item.json.iteration_count }}"
},
{
"id": "database_tech",
"name": "database_technology",
"type": "string",
"value": "={{ $('Initialize Variables').item.json.form_data['Database Technology'] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "0b8ee65f-e057-4e2e-93c4-859797612c93",
"name": "Itérations maximales atteintes",
"type": "n8n-nodes-base.set",
"position": [
1024,
-3024
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "max_iterations_msg",
"name": "message",
"type": "string",
"value": "⚠️ Reached maximum iterations (3). Proceeding with best available design."
},
{
"id": "passthrough_iteration",
"name": "iteration_count",
"type": "number",
"value": "={{ $json.iteration_count }}"
},
{
"id": "passthrough_form",
"name": "form_data",
"type": "object",
"value": "={{ $json.form_data }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ccef25b6-60e3-408e-8d2f-dbc9d907bcc4",
"name": "Le score est-il A ou B ?",
"type": "n8n-nodes-base.if",
"position": [
672,
-3168
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fdbb64c0-d9c9-4568-8aec-2e7679ae846f",
"operator": {
"type": "string",
"operation": "regex"
},
"leftValue": "={{ $json.output }}",
"rightValue": "Overall Grade: [AB][+-]?"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "b25d8d4c-46dc-4a65-99a3-3c03a4ba819c",
"name": "Peut réessayer ?",
"type": "n8n-nodes-base.if",
"position": [
832,
-2848
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "fdbb64c0-d9c9-4568-8aec-2e7679ae846f",
"operator": {
"type": "number",
"operation": "lte"
},
"leftValue": "={{ $json.iteration_count }}",
"rightValue": 3
}
]
}
},
"typeVersion": 2.2
},
{
"id": "c8d4da4b-62af-4d22-8bab-ddfca874ed72",
"name": "Formulaire",
"type": "n8n-nodes-base.form",
"position": [
2608,
-3184
],
"webhookId": "0ef42fe9-17ab-4887-b49b-e889d2056d87",
"parameters": {
"options": {},
"operation": "completion",
"completionTitle": "SQL Creation Finished",
"completionMessage": "={{ $json }}"
},
"typeVersion": 2.3
},
{
"id": "e5fbeabe-a5de-492e-8cbe-6849882db5fc",
"name": "Exécuter SQL dans PostgreSQL",
"type": "n8n-nodes-base.postgres",
"onError": "continueErrorOutput",
"position": [
2000,
-3200
],
"parameters": {
"query": "{{ $json.output }}",
"options": {},
"operation": "executeQuery"
},
"credentials": {
"postgres": {
"id": "pYPv5XduSxmDtomy",
"name": "Postgres account"
}
},
"typeVersion": 2.6
},
{
"id": "146b4b49-a91a-4280-8e2e-74f54f40c9ac",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1728,
-3104
],
"parameters": {
"color": 7,
"width": 528,
"height": 256,
"content": "## 📝 Form Intake\n**User fills database requirements**\n\n⚙️ **Customization Options:**\n- Add more fields for specific industries\n- Add file upload for existing schema\n- Add budget field for pricing tiers\n- Collect company name for personalization\n\n💡 **Tip:** The more detailed the input, the better the AI agents perform!"
},
"typeVersion": 1
},
{
"id": "c707c920-7fda-4fb0-a175-e6ab1aed64f8",
"name": "Note adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1200,
-3424
],
"parameters": {
"color": 4,
"width": 352,
"height": 240,
"content": "## 🔧 Setup Phase\n**Prepares data for agent pipeline**\n\n⚙️ **Customization:**\n- Store user data in CRM here\n- Log to analytics (Mixpanel/Segment)\n- Add user identification/tracking\n\n🎯 **Purpose:** Enables retry loop with context"
},
"typeVersion": 1
},
{
"id": "b375bb08-5363-463d-b34a-76e98eff5443",
"name": "Note adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-672,
-3488
],
"parameters": {
"color": 7,
"width": 352,
"height": 320,
"content": "## 🤖 Agent 1: Architect\n**Creates initial schema design**\n\n⚙️ **Model Config:**\n- Temp: 0.3 (creative but consistent)\n- Max tokens: 4000\n\n🎨 **Customization:**\n- Switch to GPT-4 for cost savings\n- Increase temperature for creative solutions\n- Add industry-specific templates\n\n📊 **Expected time:** 30-45 seconds"
},
"typeVersion": 1
},
{
"id": "3d373fbc-87de-42c2-82e1-536bc7550cef",
"name": "Note adhésive3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-256,
-3488
],
"parameters": {
"color": 7,
"width": 336,
"height": 320,
"content": "## 🤖 Agent 2: Reviewer\n**Quality control & validation**\n\n⚙️ **Model Config:**\n- Temp: 0.1 (strict & analytical)\n- Max tokens: 3000\n\n🎨 **Customization:**\n- Add compliance checks (GDPR, HIPAA)\n- Add industry-specific validations\n- Integrate with linting tools\n\n⚡ **Expected time:** 20-30 seconds"
},
"typeVersion": 1
},
{
"id": "28deacd5-06af-4ec2-b77b-823354b9e306",
"name": "Note adhésive4",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-3488
],
"parameters": {
"color": 7,
"width": 336,
"height": 320,
"content": "## 🤖 Agent 3: Optimizer\n**Final polish & scoring**\n\n⚙️ **Model Config:**\n- Temp: 0.5 (balanced creativity)\n- Max tokens: 3500\n\n🎨 **Customization:**\n- Adjust scoring criteria\n- Add performance benchmarking\n- Custom grading rubrics per industry\n\n🎯 **Outputs:** Score card + enhancements"
},
"typeVersion": 1
},
{
"id": "b71dce06-6436-446f-8d77-b0f5c46e87e1",
"name": "Note adhésive5",
"type": "n8n-nodes-base.stickyNote",
"position": [
624,
-3536
],
"parameters": {
"color": 7,
"width": 432,
"height": 336,
"content": "## 🔄 Quality Gate\n**Ensures high-quality output**\n\n⚙️ **Current Logic:**\n- A/B grades → Proceed ✅\n- C/D/F grades → Retry (max 3x)\n\n🎨 **Customization:**\n- Change threshold (accept C+?)\n- Add manual approval step\n- Send low scores to human review\n- Adjust max retries (1-5)\n\n💰 **Trade-off:** More retries = higher cost but better quality"
},
"typeVersion": 1
},
{
"id": "2a05b10e-906c-4be7-919e-b22d74ac15cb",
"name": "Note adhésive6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1008,
-2720
],
"parameters": {
"color": 7,
"width": 368,
"height": 304,
"content": "## 🔁 Retry Loop\n**Iterative improvement system**\n\n⚙️ **Current:** Max 3 attempts\n\n🎨 **Customization:**\n- Increase max retries for complex projects\n- Add different agents for retries\n- Implement escalation (retry with Opus)\n- Track retry metrics for optimization\n\n📊 **Insight:** Most designs pass in 1-2 iterations"
},
"typeVersion": 1
},
{
"id": "881ff4d6-e9ad-4d12-8c88-9b742288161f",
"name": "Note adhésive7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1168,
-3568
],
"parameters": {
"color": 7,
"width": 368,
"height": 336,
"content": "## 🤖 Agent 4: SQL Generator\n**Converts schema to executable SQL**\n\n⚙️ **Model Config:**\n- Temp: 0.2 (precision critical)\n- Max tokens: 4000\n\n🎨 **Customization:**\n- Add migration versioning (Flyway/Liquibase)\n- Generate ORM models (Prisma schema)\n- Add seed data generation\n- Support multiple SQL dialects\n\n💾 **Output:** Production-ready SQL script"
},
"typeVersion": 1
},
{
"id": "1bb0fab6-680e-4dad-9d94-4563b3752987",
"name": "Note adhésive8",
"type": "n8n-nodes-base.stickyNote",
"position": [
2128,
-3696
],
"parameters": {
"color": 7,
"width": 336,
"height": 336,
"content": "## ✅ Execution Validation\n**Handles success & failures gracefully**\n\n⚙️ **Current Behavior:**\n- Success → Full response\n- Failure → Script + error details\n\n🎨 **Customization:**\n- Retry failed SQL automatically\n- Send errors to monitoring (Sentry)\n- Trigger webhook on success\n- Add rollback capability\n\n🎯 **User always gets usable output**"
},
"typeVersion": 1
},
{
"id": "fd648a76-f6c8-460b-92d4-b00493d98d05",
"name": "Note adhésive9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1712,
-3616
],
"parameters": {
"color": 6,
"width": 480,
"height": 480,
"content": "## 🚀 Workflow Overview\n**AI Database Architect - Multi-Agent System**\n\n📊 **Performance:**\n- Average time: 60-90 seconds\n- Success rate: ~85% first attempt\n- Cost per run: ~$0.15-0.30\n\n🎯 **Conversion Strategy:**\n1. Free: Blueprint + Score\n2. Paid: Implementation + 3 automations\n3. Enterprise: Full setup + optimization\n\n📈 **Optimization Ideas:**\n- A/B test agent prompts\n- Cache common patterns\n- Pre-built templates for industries\n- Parallel agent execution\n\n💡 **Track:** Completion rate, avg score, retry count"
},
"typeVersion": 1
},
{
"id": "7febe33c-181c-4c01-9900-71c8ff27249c",
"name": "Note adhésive10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1920,
-2992
],
"parameters": {
"color": 7,
"width": 256,
"height": 176,
"content": "## Query Execute\n\nIf you are using **PostgreSQL** this will automatically run the script on your database"
},
"typeVersion": 1
},
{
"id": "d289f031-8814-4478-8993-00d5c09c03f1",
"name": "Soumission du formulaire",
"type": "n8n-nodes-base.formTrigger",
"position": [
-1120,
-3024
],
"webhookId": "7da47f69-23f9-49e0-8de8-3af4adce1db3",
"parameters": {
"options": {},
"formTitle": "AI Database Architect - By Evervise",
"formFields": {
"values": [
{
"fieldType": "textarea",
"fieldLabel": "What are you building?",
"placeholder": "e.g. CRM for real estate agents",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Database Technology",
"fieldOptions": {
"values": [
{
"option": "PostgreSQL"
},
{
"option": "MySQL"
},
{
"option": "MSSQL"
},
{
"option": "MariaDB"
}
]
},
"requiredField": true
},
{
"fieldLabel": "Industry/Niche",
"placeholder": "e.g. Real Estate, SaaS, E-commerce",
"requiredField": true
},
{
"fieldType": "textarea",
"fieldLabel": "What data do you need to track?",
"placeholder": "e.g. contacts, deals, properties, interactions, documents"
},
{
"fieldType": "number",
"fieldLabel": "Team Size",
"placeholder": "5"
},
{
"fieldLabel": "Expected Scale",
"placeholder": "e.g. 1000 records, 100k records, 1M+ records"
},
{
"fieldType": "textarea",
"fieldLabel": "Key Workflows",
"placeholder": "e.g. lead comes in → assign to agent → track showings → close deal → commission calculation"
},
{
"fieldLabel": "Any integrations needed?",
"placeholder": "email, calendar, WhatsApp, Stripe, etc."
},
{
"fieldType": "textarea",
"fieldLabel": "Special Requirements",
"placeholder": "multi-language, file uploads, complex relationships, audit logging, etc."
},
{
"fieldType": "email",
"fieldLabel": "Your Email",
"placeholder": "your@email.com",
"requiredField": true
}
]
},
"formDescription": "Get a production-grade database schema designed and reviewed by 3 AI experts"
},
"typeVersion": 2.3
},
{
"id": "a4f3bc0e-9293-4917-bd55-2b0309f9d31c",
"name": "Si l'utilisateur utilise Excel",
"type": "n8n-nodes-base.if",
"position": [
1568,
-3184
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3ba71a4a-01e0-4be3-bf2e-349fe5c6710c",
"operator": {
"type": "string",
"operation": "contains"
},
"leftValue": "={{ $('Form Submission').item.json['Database Technology'].toLowerCase() }}",
"rightValue": "postgres"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "93879c3e-e2be-44cc-a5ae-050be780ae42",
"name": "Fin du formulaire sans exécution",
"type": "n8n-nodes-base.form",
"position": [
1888,
-2736
],
"webhookId": "0ef42fe9-17ab-4887-b49b-e889d2056d87",
"parameters": {
"options": {},
"operation": "completion",
"completionTitle": "SQL Creation Finished",
"completionMessage": "={{ $json }}"
},
"typeVersion": 2.3
}
],
"connections": {
"b25d8d4c-46dc-4a65-99a3-3c03a4ba819c": {
"main": [
[
{
"node": "a5028fd9-b726-413b-86aa-9f3735395bb9",
"type": "main",
"index": 0
}
],
[
{
"node": "0b8ee65f-e057-4e2e-93c4-859797612c93",
"type": "main",
"index": 0
}
]
]
},
"fa2b059f-7347-4c81-a194-4e7b02e0a033": {
"main": [
[
{
"node": "c8d4da4b-62af-4d22-8bab-ddfca874ed72",
"type": "main",
"index": 0
}
]
]
},
"1648a9d6-a261-45b8-8dc9-516fd62a7a3e": {
"ai_languageModel": [
[
{
"node": "58921f8a-0b6f-460b-8202-69327c364d45",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"e102d0ff-e176-49b5-a999-a3ccf2fb7f42": {
"ai_languageModel": [
[
{
"node": "a5028fd9-b726-413b-86aa-9f3735395bb9",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"d289f031-8814-4478-8993-00d5c09c03f1": {
"main": [
[
{
"node": "6372d515-3314-4ca8-acf4-462fb4e2fbb1",
"type": "main",
"index": 0
}
]
]
},
"87d374f8-babb-41f5-ac5c-f45be51df90c": {
"ai_languageModel": [
[
{
"node": "4e2a9518-4587-4ffe-a4a0-3f771019f22e",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"0b898ea5-9799-4b59-b26b-0b0521a8e2c6": {
"main": [
[
{
"node": "b25d8d4c-46dc-4a65-99a3-3c03a4ba819c",
"type": "main",
"index": 0
}
]
]
},
"ccef25b6-60e3-408e-8d2f-dbc9d907bcc4": {
"main": [
[
{
"node": "739b10a8-f533-403f-b71f-9095d982b669",
"type": "main",
"index": 0
}
],
[
{
"node": "0b898ea5-9799-4b59-b26b-0b0521a8e2c6",
"type": "main",
"index": 0
}
]
]
},
"509218a4-3447-49f9-a8bc-b789ba3432ec": {
"main": [
[
{
"node": "c8d4da4b-62af-4d22-8bab-ddfca874ed72",
"type": "main",
"index": 0
}
]
]
},
"21ea3c45-a89d-4f45-b044-958be52b13be": {
"ai_languageModel": [
[
{
"node": "739b10a8-f533-403f-b71f-9095d982b669",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"6372d515-3314-4ca8-acf4-462fb4e2fbb1": {
"main": [
[
{
"node": "a5028fd9-b726-413b-86aa-9f3735395bb9",
"type": "main",
"index": 0
}
]
]
},
"a4f3bc0e-9293-4917-bd55-2b0309f9d31c": {
"main": [
[
{
"node": "e5fbeabe-a5de-492e-8cbe-6849882db5fc",
"type": "main",
"index": 0
}
],
[
{
"node": "93879c3e-e2be-44cc-a5ae-050be780ae42",
"type": "main",
"index": 0
}
]
]
},
"0b8ee65f-e057-4e2e-93c4-859797612c93": {
"main": [
[
{
"node": "739b10a8-f533-403f-b71f-9095d982b669",
"type": "main",
"index": 0
}
]
]
},
"58921f8a-0b6f-460b-8202-69327c364d45": {
"main": [
[
{
"node": "4e2a9518-4587-4ffe-a4a0-3f771019f22e",
"type": "main",
"index": 0
}
]
]
},
"e5fbeabe-a5de-492e-8cbe-6849882db5fc": {
"main": [
[
{
"node": "509218a4-3447-49f9-a8bc-b789ba3432ec",
"type": "main",
"index": 0
}
],
[
{
"node": "fa2b059f-7347-4c81-a194-4e7b02e0a033",
"type": "main",
"index": 0
}
]
]
},
"a5028fd9-b726-413b-86aa-9f3735395bb9": {
"main": [
[
{
"node": "58921f8a-0b6f-460b-8202-69327c364d45",
"type": "main",
"index": 0
}
]
]
},
"4e2a9518-4587-4ffe-a4a0-3f771019f22e": {
"main": [
[
{
"node": "ccef25b6-60e3-408e-8d2f-dbc9d907bcc4",
"type": "main",
"index": 0
}
]
]
},
"739b10a8-f533-403f-b71f-9095d982b669": {
"main": [
[
{
"node": "a4f3bc0e-9293-4917-bd55-2b0309f9d31c",
"type": "main",
"index": 0
}
]
]
}
}
}Foire aux questions
Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Génération d'opportunités d'automatisation métier et de rapports ROI avec Claude AI
Utiliser Claude AI pour générer des opportunités d'automatisation commerciale et un rapport sur le ROI
Set
Code
Gmail
+
Set
Code
Gmail
19 NœudsEvervise
Analyse et optimisation de la page de destination avec le système d'agent Claude 4
Analyse et optimisation de pages de destination avec le système d'agents Claude 4
Set
Code
Gmail
+
Set
Code
Gmail
24 NœudsEvervise
AIcontenu创作与WordPressautomatiquepublication - Pexels API图像flux de travail
基于Pexels API图像deAIcontenu创作与WordPressautomatiquepublicationflux de travail
If
Set
Form
+
If
Set
Form
30 NœudsMateusz Kosiorek
Intelligence Artificielle
Analyse automatisée des réunions Microsoft Teams avec GPT-4.1, Outlook et Mem.ai
Utiliser GPT-4.1, Outlook et Mem.ai pour automatiser l'analyse des réunions Microsoft Teams
If
Set
Code
+
If
Set
Code
61 NœudsWayne Simpson
Ressources Humaines
Automatisation de la diligence raisonnable sur les fournisseurs avec Gemini et Jina AI
Automatiser l'enquête de diligence raisonnable des fournisseurs avec Gemini et Jina AI
If
Set
Code
+
If
Set
Code
27 NœudsAdnan
Extraction de documents
Agent de vente automatisé multiplateformes
Agent de vente multiplateforme avec RAG, CRM et traitement des paiements
If
Set
Switch
+
If
Set
Switch
83 NœudsElectrabot
Ventes
Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds31
Catégorie-
Types de nœuds8
Description de la difficulté
Auteur
Evervise
@everviseLiens externes
Voir sur n8n.io →
Partager ce workflow