Classifier et extraire les données de plans d'architecte en utilisant Mistral AI OCR et JigsawStack

Avancé

Ceci est unMiscellaneous, AI Summarization, Multimodal AIworkflow d'automatisation du domainecontenant 24 nœuds.Utilise principalement des nœuds comme If, Code, Switch, Webhook, HttpRequest. Classer et extraire des données de plans d'étage en utilisant Mistral AI OCR et JigsawStack

Prérequis
  • Point de terminaison HTTP Webhook (généré automatiquement par n8n)
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
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
{
  "meta": {
    "instanceId": "834bc6c387a1c56d0622a24b912577f9e6d66c5873f4e6426166054eb488d8fc",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "120c98f6-17fd-46e7-b449-539cf0e6eccd",
      "name": "Note – Point de terminaison basse qualité",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4500,
        -300
      ],
      "parameters": {
        "width": 400,
        "height": 440,
        "content": "## 🚫 Low Quality / Drop\n\n**When:** Confidence < 0.4 or unclear image\n\n**Response:**\n- Tell user file isn't a floorplan\n- Suggest uploading blueprint/CAD\n- List acceptable formats (JPG, PNG, PDF)\n\n**User sees:** \"Unable to Process Your Floorplan\""
      },
      "typeVersion": 1
    },
    {
      "id": "fa9dc8cf-6eaa-4a65-b6d0-27d8da7b1a59",
      "name": "Note – Revue manuelle",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4820,
        520
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 480,
        "content": "## ⚠️ Manual Review Needed\n\n**When:** Confidence 0.4-0.85 (uncertain)\n\n**Response:**\n- File needs human check\n- Promise 2-hour turnaround\n- Set expectation for email follow-up\n\n**User sees:** \"Manual Review Required\""
      },
      "typeVersion": 1
    },
    {
      "id": "65ded5cd-8648-4eaa-a230-b5eb562df429",
      "name": "Note – Continuer vers JIG",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5140,
        20
      ],
      "parameters": {
        "color": 4,
        "width": 380,
        "height": 460,
        "content": "## ✅ Continue to Step 2\n\n**When:** Confidence ≥ 0.85 (from text analysis)\n\n**Response:**\n- Confirm successful validation\n- Explain next steps (OCR/measurement)\n- Set 30-60 second expectation\n\n**User sees:** \"Floorplan Accepted!\"\n\n*Continues to Jigsaw OCR*"
      },
      "typeVersion": 1
    },
    {
      "id": "0016e3f6-0552-4cee-b59a-445129a3236a",
      "name": "Note – Succès de classification",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3280,
        -520
      ],
      "parameters": {
        "color": 5,
        "width": 580,
        "height": 540,
        "content": "## Image Classification\n\n**When:** Image files with high AI confidence\n\n**Response:**\n- Premium quality detected\n- Instant processing message\n- List what's being calculated\n\n**User sees:** \"Perfect Quality Floorplan\"\n\n*Fast track to measurements*"
      },
      "typeVersion": 1
    },
    {
      "id": "c96745c9-5646-423a-98e9-239df792662e",
      "name": "Note – Résumé du flux",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2340,
        -340
      ],
      "parameters": {
        "color": 6,
        "width": 400,
        "height": 360,
        "content": "## 📊 Flow Summary\n\n**PDF Path:**\nExtract text → Score confidence → Route by threshold\n\n**Image Path:**\nDirect to AI classification → Route by result\n\n**Thresholds:**\n- < 40%: Not a floorplan\n- 40-85%: Manual review\n- ≥ 85%: Auto-process\n\n**Goal:** Filter bad uploads early, save API costs"
      },
      "typeVersion": 1
    },
    {
      "id": "e0bcf1b8-ee8e-4a88-afe8-23b9a7b7c4ac",
      "name": "Note – Limite de fichier",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3700,
        480
      ],
      "parameters": {
        "color": 2,
        "width": 440,
        "height": 460,
        "content": "## 📏 File Size/Pages Limit\n\n**When:**\n- File > 10MB\n- PDF > 20 pages\n\n**Response:**\n- Explain size limits\n- Ask to split multi‑floor plans\n- Suggest extracting relevant pages\n\n**User sees:** \"File Too Large\""
      },
      "typeVersion": 1
    },
    {
      "id": "67704d28-dbab-4e48-b0b6-1643e0dadc7e",
      "name": "📘 Documentation du flux de travail",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1620,
        -340
      ],
      "parameters": {
        "width": 600,
        "height": 1560,
        "content": "# 🏠 Floorplan Classifier & Measurement Extractor  \n\n## ✅ What This Workflow Does  \n\nAutomatically validates uploaded files (**PDFs or images**) to check if they are genuine floorplans. It rejects non‑floorplans early, and prepares valid files for **room measurement & analysis**.  \n\nThe workflow has **two phases**:  \n1. **Classification (Step 1):** Smart filters & classifiers decide if the upload is usable.  \n2. **Calculation (Step 2):** OCR + AI extract structured room measurements (area + wall surfaces) and compile results.  \n\n---\n\n### Supported File Types  \n- **PDFs** → text is extracted for keyword/measurement checks, then passed to AI.  \n- **Images (JPG, PNG, etc.)** → sent directly to the classifier (can’t extract metadata text).  \n\n---\n\n### Quality Filtering (Step 1)  \n1. **Heuristic checks** → detects floorplan indicators:  \n   - Room names (living room, keuken, slaapkamer, etc.)  \n   - Measurements (m², mm)  \n   - Technical symbols (e.g., WCD, TH, WP).  \n2. **AI classification (JigsawStack)** → robustly decides floorplan vs. not.  \n\n---\n\n### Confidence Routing (Step 1)  \n- **< 40% confidence** → ❌ Rejected (not a floorplan).  \n- **40–85% confidence** → ⚠️ Unclear → ask for better upload/manual review.  \n- **> 85% confidence** → ✅ Accepted floorplan → sent to **Measurement Extraction (Step 2)**.  \n\n---\n\n### Measurement Extraction (Paid version ONLY)  \n---\n\n## ⚒ Requirements  \n- **JigsawStack API key** → File storage + classification  \n- **Mistral Cloud API key** → OCR measurement extraction  \n- **n8n instance** → Self‑hosted or Cloud  \n- **Webhook endpoint** → for uploads & responses  \n\n---\n\n## 🔧 Customization  \n- Adjust **heuristic rules** (keywords/symbols) to match your market.  \n- Change **confidence thresholds** (strict vs. lenient filtering).  \n- Set **wall height** or fallback ratio for wall area calculations.  \n- Choose your OCR/AI provider (Mistral, AWS Textract, Azure Vision, etc.).  \n- Extend workflows to **save results to DB, Notion, Slack, CRM**.  \n\n---\n\n## ⚠️ Notes  \n- Never hardcode API keys → use **n8n credential manager**.  \n- All nodes are **renamed by purpose** (easy to follow).  \n- Sticky Notes document both phases clearly.  \n- Designed as **plug‑and‑play end‑to‑end pipeline** for fast onboarding.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "30aee9c1-02f8-40b4-b431-8bc122bb08d6",
      "name": "Vérifier – Consentement RGPD",
      "type": "n8n-nodes-base.if",
      "position": [
        2560,
        80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "1e3d1d01-1b9e-45b5-9616-93335d2bc270",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.body.GDPR_check || $json.body.GDPR_check2}}",
              "rightValue": ""
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "2e9797b2-9ce9-4628-b049-95b28bd43e4e",
      "name": "Webhook – Réception du téléchargement",
      "type": "n8n-nodes-base.webhook",
      "position": [
        2320,
        80
      ],
      "webhookId": "fb607944-5e45-4dab-b805-7d0701e5eaa9",
      "parameters": {
        "path": "fp-mvp",
        "options": {
          "ignoreBots": true,
          "allowedOrigins": "*"
        },
        "httpMethod": "POST",
        "responseMode": "responseNode",
        "authentication": "basicAuth"
      },
      "credentials": {
        "httpBasicAuth": {
          "id": "cBS3tiMMVMINcjbT",
          "name": "stucstunter.nl"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c2de825d-fd9b-4e42-a43c-ff570ea90068",
      "name": "Répondre – Consentement requis",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2860,
        300
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={\n  \"thankYouMessage\": \"<div style='text-align:center; padding:40px 20px; font-family:system-ui;'><h2 style='color:#FF5252;'>⚠️ Consent Required</h2><p>We need your permission to process your floorplan. Please check the privacy consent box and try again.</p><p style='font-size:12px; color:#999; margin-top:20px;'>Your data is deleted within 10 minutes • GDPR compliant</p></div>\"\n}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "d48a571b-0dac-48b2-b60e-d8485ad9f980",
      "name": "Traiter – Téléchargements multiples de fichiers",
      "type": "n8n-nodes-base.code",
      "position": [
        2820,
        60
      ],
      "parameters": {
        "jsCode": "const results = [];\n\nfor (const item of items) {\n  if (!item.binary) continue;\n\n  for (const [key, value] of Object.entries(item.binary)) {\n    results.push({\n      json: {\n        fileKey: key,\n        fileName: value.fileName,\n        mimeType: value.mimeType,\n        fileExtension: value.fileExtension,\n        fileSize: value.fileSize\n      },\n      binary: {\n        [key]: value   // behoud originele binary key naam!\n      }\n    });\n  }\n}\n\nreturn results;"
      },
      "typeVersion": 2
    },
    {
      "id": "cb575124-245b-4d34-aa23-1d04fddfeea3",
      "name": "Vérifier – Type de fichier (PDF/Image)",
      "type": "n8n-nodes-base.if",
      "position": [
        3040,
        60
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "837a00af-0c9d-4dde-a184-4d4c2d918005",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ [\"png\",\"jpg\",\"jpeg\",\"bmp\",\"tiff\",\"webp\",\"gif\"]\n   .includes($json.fileExtension.toLowerCase()) }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "28353d44-0328-4407-b942-0a87b44c244f",
      "name": "Extraire – Métadonnées/Texte PDF",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        3300,
        80
      ],
      "parameters": {
        "options": {
          "keepSource": "both"
        },
        "operation": "pdf",
        "binaryPropertyName": "={{ $json.fileKey }}"
      },
      "typeVersion": 1
    },
    {
      "id": "4023d030-c089-413a-864d-7a467ce63232",
      "name": "Vérifier – Taille et pages du fichier",
      "type": "n8n-nodes-base.if",
      "position": [
        3500,
        80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d94826b9-a2fe-4af2-9c76-0d76fdb0c0d8",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ \n  (() => {\n    const raw = $json.fileSize || \"\";\n    const val = parseFloat(raw);\n    if (raw.toLowerCase().includes(\"mb\")) return val < 10;\n    if (raw.toLowerCase().includes(\"kb\")) return val < 10000; // 10 MB = 10,000 KB\n    if (raw.toLowerCase().includes(\"bytes\")) return val < 10485760; // 10 MB in bytes\n    return false; // if unknown format\n  })()\n}}",
              "rightValue": ""
            },
            {
              "id": "b58f8207-18c9-4e0a-a52d-6a3151f6ee57",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{$json.fileExtension.toLowerCase() !== \"pdf\"\n  ? true \n  : ($json.numpages && $json.numpages < 10)}}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "25d2a512-494a-4552-a6c6-e68714fd522d",
      "name": "Analyser – Score de confiance (Heuristiques)",
      "type": "n8n-nodes-base.code",
      "position": [
        3740,
        60
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "// --- SAFER INPUT HANDLING ---\nconst text = ($json.text || \"\").toLowerCase();\nconst numpages = $json.numpages || 1;\n\nlet score = 0;\nlet reasons = []; \n\n// --- KEYWORD LISTS ---\nconst nlSpaces = [\"woonkamer\", \"keuken\", \"slaapkamer\", \"badkamer\", \"overloop\", \"entree\", \"hal\", \"toilet\", \"berging\", \"techniek\", \"meterkast\", \"mk\"];\nconst enSpaces = [\"living room\", \"kitchen\", \"bedroom\", \"bathroom\", \"landing\", \"entrance\", \"hall\", \"toilet\", \"storage\", \"utility room\"];\nconst floorWords = [\"verdieping\", \"begane grond\", \"zolder\", \"kelder\", \"vliering\", \"doorsnede\", \"gevel\", \"plattegrond\"];\nconst enFloorWords = [\"floor\", \"ground floor\", \"attic\", \"basement\", \"cross-section\", \"facade\", \"floor plan\"];\nconst symbols = [\"wcd\", \"th\", \"wp\", \"v.v.\", \"wm\", \"wd\", \"wtw\", \"pv\", \"rad.\", \"rm\", \"gr\"];\nconst projectWords = [\"bouwnummer\", \"opdrachtgever\", \"project\", \"schaal\", \"datum\", \"bladnummer\", \"formaat\"];\n\n// --- CHECKS ---\n// 1. Spaces\nconst foundNlSpaces = nlSpaces.filter(w => text.includes(w));\nconst foundEnSpaces = enSpaces.filter(w => text.includes(w));\nif ((foundNlSpaces.length + foundEnSpaces.length) >= 3) {\n  score += 0.35;\n  reasons.push(`Found ${foundNlSpaces.length + foundEnSpaces.length} room names`);\n}\n\n// 2. m² matches\nconst m2Matches = text.match(/\\d+(?:[.,]\\d+)?\\s*m(?:²|2)/g) || [];\nif (m2Matches.length >= 3) {\n  score += 0.25;\n  reasons.push(`Found ${m2Matches.length} m² measurements`);\n}\n\n// 3. mm matches (dimensions)\nconst mmMatches = text.match(/\\d{3,}\\s*mm/g) || [];\nif (mmMatches.length >= 3) {\n  score += 0.15;\n  reasons.push(`Found ${mmMatches.length} mm measurements`);\n}\n\n// 4. Symbols\nconst foundSymbols = symbols.filter(s => text.includes(s.toLowerCase()));\nif (foundSymbols.length >= 3) {\n  score += 0.15;\n  reasons.push(`Found ${foundSymbols.length} technical symbols`);\n}\n\n// 5. Floor/plan words\nconst foundFloors = [...floorWords, ...enFloorWords].filter(w => text.includes(w));\nif (foundFloors.length >= 2) {\n  score += 0.10;\n  reasons.push(`Found ${foundFloors.length} floor/drawing parts`);\n}\n\n// 6. Project words\nconst foundProjectWords = projectWords.filter(w => text.includes(w));\nif (foundProjectWords.length >= 3) {\n  score += 0.10;\n  reasons.push(`Found ${foundProjectWords.length} project info words`);\n}\n\n// --- NORMALIZE SCORE ---\nif (score > 1) score = 1;\n\n// ✅ Return one item with JSON + preserve binary\nreturn {\n  json: {\n    ...$json,\n    confidence: parseFloat(score.toFixed(2)),\n    analysis: {\n      reasons,\n      foundNlSpaces,\n      foundEnSpaces,\n      m2Matches,\n      mmMatches,\n      foundSymbols,\n      foundFloors,\n      foundProjectWords,\n      pages: numpages\n    }\n  },\n   binary: item.binary // pass binary unchanged\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "87868e3c-e4eb-47ff-acf0-bb4072d38bbc",
      "name": "Router – Niveaux de confiance",
      "type": "n8n-nodes-base.switch",
      "position": [
        4020,
        0
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "very_likely_not_floorplan",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "number",
                      "operation": "lt"
                    },
                    "leftValue": "={{ $json.confidence }}",
                    "rightValue": 0.2
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "likely_not_floorplan",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "number",
                      "operation": "lt"
                    },
                    "leftValue": "={{ $json.confidence }}",
                    "rightValue": 0.4
                  },
                  {
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $json.confidence }}",
                    "rightValue": 0.2
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "uncertain_low_confidence",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "number",
                      "operation": "lt"
                    },
                    "leftValue": "={{ $json.confidence }}",
                    "rightValue": 0.6
                  },
                  {
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $json.confidence }}",
                    "rightValue": 0.4
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "=uncertain_high_confidence",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "number",
                      "operation": "lt"
                    },
                    "leftValue": "={{ $json.confidence }}",
                    "rightValue": 0.85
                  },
                  {
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $json.confidence }}",
                    "rightValue": 0.6
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "very_likely_floorplan",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $json.confidence }}",
                    "rightValue": 0.85
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra",
          "allMatchingOutputs": true,
          "renameFallbackOutput": "needs_review"
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "0a0bf7f3-0eb5-457a-b445-48111e7ac7d3",
      "name": "Répondre – Basse qualité/Abandon",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        4640,
        -20
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={{\n  {\n    \"thankYouMessage\":\n      $json.confidence && $json.confidence[0] < 0.4\n        ? \"🚫 Unable to Process Your Floorplan. The image quality is too low or unclear. Please upload an architectural blueprint or CAD drawing instead. Accepted formats: JPG, PNG, PDF.\"\n        : (\n            $json.predictions[0] === \"floorplan\"\n              ? \"SUCCESS: Floorplan detected! Processing your measurements now. This will take 15-30 seconds.\"\n              : \"ERROR: Not a floorplan detected. Please upload an architectural blueprint or technical floor layout instead.\"\n          )\n  }\n}}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "cee2d67e-f07c-49b8-9018-e0753ff16d76",
      "name": "Classer – Fichiers image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3560,
        -200
      ],
      "parameters": {
        "url": "https://api.jigsawstack.com/v1/classification",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"dataset\": [\n    {\n      \"type\": \"image\",\n      \"value\": \"{{ $json.temp_public_url }}\"\n    }\n  ],\n  \"labels\": [\n    {\n      \"type\": \"text\",\n      \"value\": \"floorplan\"\n    },\n    {\n      \"type\": \"text\",\n      \"value\": \"not floorplan\"\n    }\n  ]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "A2GUIb1l3Nybba3k",
          "name": "jigsaw"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "14201ed6-6613-4bfc-b8bd-d7434507036c",
      "name": "Classer – Texte PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4880,
        820
      ],
      "parameters": {
        "url": "https://api.jigsawstack.com/v1/classification",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"dataset\": [\n    {\n      \"type\": \"text\",\n      \"value\": {{ JSON.stringify ($json.text) }}\n    }\n  ],\n  \"labels\": [\n    {\n      \"type\": \"text\",\n      \"value\": \"floorplan\"\n    },\n    {\n      \"type\": \"text\",\n      \"value\": \"not floorplan\"\n    }\n  ]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "A2GUIb1l3Nybba3k",
          "name": "jigsaw"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "13aa840e-eb2c-42c5-a344-a1aab65d89d2",
      "name": "Répondre – Résultat de classification (Image)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3720,
        -200
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={{\n  {\n    \"thankYouMessage\": $json.predictions[0] === \"floorplan\" \n      ? \"SUCCESS: Floorplan detected! Processing your measurements now. This will take 15-30 seconds.\"\n      : \"ERROR: Not a floorplan detected. Please upload an architectural blueprint or technical floor layout instead.\"\n  }\n}}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "988144cc-e416-440c-8fb6-2b445c0b398b",
      "name": "Répondre – Résultat de classification (PDF)",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        5040,
        820
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={{\n  {\n    \"thankYouMessage\": $json.predictions[0] === \"floorplan\" \n      ? \"SUCCESS: Floorplan detected! Processing your measurements now. This will take 15-30 seconds.\"\n      : \"ERROR: Not a floorplan detected. Please upload an architectural blueprint or technical floor layout instead.\"\n  }\n}}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "38a92798-d6c2-4d46-b069-069c46ee6de4",
      "name": "Répondre – Fichier trop volumineux",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3740,
        780
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={{ {\n  \"thankYouMessage\": \"📏 File Too Large. The uploaded file exceeds our limits (max 10MB or PDFs with more than 20 pages). Please split multi‑floor plans into separate files or extract only the relevant pages, then try again.\"\n} }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "2c4d4e53-59dd-4b47-8213-e86ff873d874",
      "name": "Télécharger – JigsawStack (Stockage)",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueErrorOutput",
      "maxTries": 2,
      "position": [
        3340,
        -180
      ],
      "parameters": {
        "url": "https://api.jigsawstack.com/v1/store/file",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendQuery": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "key",
              "value": "={{ $json.fileName }}"
            },
            {
              "name": "overwrite",
              "value": "true"
            },
            {
              "name": "temp_public_url",
              "value": "true"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "={{ $json.mimeType }}"
            }
          ]
        },
        "inputDataFieldName": "={{ $json.fileKey }}"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "A2GUIb1l3Nybba3k",
          "name": "jigsaw"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2,
      "waitBetweenTries": 3000
    },
    {
      "id": "0b6380ad-d3e7-499d-a097-f5cde6031129",
      "name": "Aucune opération, ne rien faire",
      "type": "n8n-nodes-base.noOp",
      "position": [
        5260,
        340
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "14201ed6-6613-4bfc-b8bd-d7434507036c": {
      "main": [
        [
          {
            "node": "988144cc-e416-440c-8fb6-2b445c0b398b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "30aee9c1-02f8-40b4-b431-8bc122bb08d6": {
      "main": [
        [
          {
            "node": "d48a571b-0dac-48b2-b60e-d8485ad9f980",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c2de825d-fd9b-4e42-a43c-ff570ea90068",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cee2d67e-f07c-49b8-9018-e0753ff16d76": {
      "main": [
        [
          {
            "node": "13aa840e-eb2c-42c5-a344-a1aab65d89d2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0b6380ad-d3e7-499d-a097-f5cde6031129": {
      "main": [
        []
      ]
    },
    "2e9797b2-9ce9-4628-b049-95b28bd43e4e": {
      "main": [
        [
          {
            "node": "30aee9c1-02f8-40b4-b431-8bc122bb08d6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4023d030-c089-413a-864d-7a467ce63232": {
      "main": [
        [
          {
            "node": "25d2a512-494a-4552-a6c6-e68714fd522d",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "38a92798-d6c2-4d46-b069-069c46ee6de4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "87868e3c-e4eb-47ff-acf0-bb4072d38bbc": {
      "main": [
        [
          {
            "node": "0a0bf7f3-0eb5-457a-b445-48111e7ac7d3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "0a0bf7f3-0eb5-457a-b445-48111e7ac7d3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "14201ed6-6613-4bfc-b8bd-d7434507036c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "14201ed6-6613-4bfc-b8bd-d7434507036c",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "0b6380ad-d3e7-499d-a097-f5cde6031129",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "28353d44-0328-4407-b942-0a87b44c244f": {
      "main": [
        [
          {
            "node": "4023d030-c089-413a-864d-7a467ce63232",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cb575124-245b-4d34-aa23-1d04fddfeea3": {
      "main": [
        [
          {
            "node": "2c4d4e53-59dd-4b47-8213-e86ff873d874",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "28353d44-0328-4407-b942-0a87b44c244f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2c4d4e53-59dd-4b47-8213-e86ff873d874": {
      "main": [
        [
          {
            "node": "cee2d67e-f07c-49b8-9018-e0753ff16d76",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d48a571b-0dac-48b2-b60e-d8485ad9f980": {
      "main": [
        [
          {
            "node": "cb575124-245b-4d34-aa23-1d04fddfeea3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "25d2a512-494a-4552-a6c6-e68714fd522d": {
      "main": [
        [
          {
            "node": "87868e3c-e4eb-47ff-acf0-bb4072d38bbc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "13aa840e-eb2c-42c5-a344-a1aab65d89d2": {
      "main": [
        []
      ]
    }
  }
}
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é - Divers, Résumé IA, IA Multimodale

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.

Informations sur le workflow
Niveau de difficulté
Avancé
Nombre de nœuds24
Catégorie3
Types de nœuds9
Description de la difficulté

Adapté aux utilisateurs avancés, avec des workflows complexes contenant 16+ nœuds

Auteur
Stephan Koning

Stephan Koning

@reklaim

Account Executive by day , Noco builder for fun at night and always a proud dad of Togo the Samoyed.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34