{
  "name": "Estimate 4D/5D construction costs from Revit BIM models with DDC CWICR",
  "nodes": [
    {
      "id": "7b6d90b8-5909-412b-8bdf-694bfc1790c9",
      "name": "When clicking 'Execute workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        240,
        624
      ]
    },
    {
      "id": "564abc51-4148-4619-99d8-90a1d0b42f0c",
      "name": "Setup - Define file paths1",
      "type": "n8n-nodes-base.set",
      "position": [
        528,
        624
      ]
    },
    {
      "id": "1823dd10-c1ec-4463-997b-99f1b6a21319",
      "name": "Configure Language & Vector DB",
      "type": "n8n-nodes-base.code",
      "position": [
        752,
        624
      ]
    },
    {
      "id": "c6c247ac-60e9-428f-9618-dc3ea93461ee",
      "name": "Non-3D View Elements Output1",
      "type": "n8n-nodes-base.set",
      "position": [
        1040,
        992
      ]
    },
    {
      "id": "10a25b62-845b-4b40-91fd-e719f47f6681",
      "name": "Find Category Fields",
      "type": "n8n-nodes-base.code",
      "position": [
        576,
        1472
      ]
    },
    {
      "id": "ea9bc69a-9357-4c7a-8e3f-256588005880",
      "name": "Apply Classification to Groups",
      "type": "n8n-nodes-base.code",
      "position": [
        1200,
        1472
      ]
    },
    {
      "id": "8806d190-86f8-4ba3-a966-d9079ddc3ccf",
      "name": "Non-Building Elements Output1",
      "type": "n8n-nodes-base.set",
      "position": [
        1552,
        1328
      ]
    },
    {
      "id": "03f51fd1-08dc-480c-9452-ffb1f6f13c73",
      "name": "Is Building Element1",
      "type": "n8n-nodes-base.if",
      "position": [
        1376,
        1472
      ]
    },
    {
      "id": "01596437-c3fe-4f20-bbb0-530043bfb883",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2064,
        1056
      ],
      "parameters": {
        "width": 208,
        "height": 272,
        "content": "## Only 10 Groups\n\n\n\n\n\n\n\n\n\n\n\n\nLimits output to first 10 element groups for faster testing and debugging. "
      }
    },
    {
      "id": "4bfe5ddc-253b-4fdc-b09a-83996a1f4a9c",
      "name": "Group Data with AI Rules1",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        1104
      ]
    },
    {
      "id": "0963e1e8-5985-45d5-8793-a525bdb17613",
      "name": "Extract Headers and Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1136,
        1104
      ]
    },
    {
      "id": "2821f087-9a2d-44af-a9fc-013313157b5a",
      "name": "Read Excel File1",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        544,
        1120
      ]
    },
    {
      "id": "fd8e1e04-83de-4c38-9e1c-64e47ebc98c7",
      "name": "Parse Excel1",
      "type": "n8n-nodes-base.spreadsheetFile",
      "position": [
        688,
        1120
      ]
    },
    {
      "id": "b7d2a68f-c3c7-4314-a6de-9c556f0dc2f6",
      "name": "Create - Excel filename1",
      "type": "n8n-nodes-base.set",
      "position": [
        1040,
        528
      ]
    },
    {
      "id": "8df36e4f-de0a-4699-9675-cf53fe51d031",
      "name": "Check - Does Excel file exist?1",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        1248,
        528
      ]
    },
    {
      "id": "74909e53-96fd-4b53-8358-614fdefff67e",
      "name": "If - File exists?1",
      "type": "n8n-nodes-base.if",
      "position": [
        1408,
        528
      ]
    },
    {
      "id": "9333fc8b-3fae-45f4-99e3-8b6cc771358d",
      "name": "Extract - Run converter1",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        1168,
        784
      ]
    },
    {
      "id": "5938642d-5d10-4ca2-95c0-23ccf1870ec9",
      "name": "Info - Skip conversion1",
      "type": "n8n-nodes-base.set",
      "position": [
        1584,
        496
      ]
    },
    {
      "id": "91c1c1f8-027b-47e0-90e7-cb195bb88590",
      "name": "Check - Did extraction succeed?1",
      "type": "n8n-nodes-base.if",
      "position": [
        1376,
        784
      ]
    },
    {
      "id": "9f626e7b-e60e-4af7-bd87-355e5a961f95",
      "name": "Error - Show what went wrong1",
      "type": "n8n-nodes-base.set",
      "position": [
        1584,
        656
      ]
    },
    {
      "id": "96473e72-2069-4e84-a577-9b59b526d947",
      "name": "Set xlsx_filename after success1",
      "type": "n8n-nodes-base.set",
      "position": [
        1744,
        800
      ]
    },
    {
      "id": "d242257c-6836-40be-9990-6a941c2f0589",
      "name": "Merge - Continue workflow1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1904,
        576
      ]
    },
    {
      "id": "02a7cd9b-a60b-4f63-90f0-5bf6895e3736",
      "name": "Set Parameters1",
      "type": "n8n-nodes-base.set",
      "position": [
        2080,
        800
      ]
    },
    {
      "id": "d865851b-2601-4c7a-af30-d92dc5ad927a",
      "name": "Process AI Response1",
      "type": "n8n-nodes-base.code",
      "position": [
        1728,
        1104
      ]
    },
    {
      "id": "2171308c-bb09-4e75-841c-59e8391deb88",
      "name": "On the standard 3D View",
      "type": "n8n-nodes-base.if",
      "position": [
        864,
        1120
      ]
    },
    {
      "id": "ed80580f-23d9-46cc-bb01-f580fad59941",
      "name": "STAGE 0 - Collect BIM Data",
      "type": "n8n-nodes-base.code",
      "position": [
        1696,
        1456
      ]
    },
    {
      "id": "2894525e-321f-4e0d-9d82-831a6807044e",
      "name": "Parse Stage 1 - Project Type",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        1776
      ]
    },
    {
      "id": "abeaf708-7a2d-47c1-bd6b-67a47ad8e719",
      "name": "Parse Stage 2 - Phases",
      "type": "n8n-nodes-base.code",
      "position": [
        1088,
        1776
      ]
    },
    {
      "id": "d4c78a1e-2e69-460c-80dc-9717cfc437b4",
      "name": "Parse Stage 3 - Final Structure",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        1776
      ]
    },
    {
      "id": "7862d526-b3ab-45c6-9a05-a68b8c79ec48",
      "name": "Prepare Types for Decomposition",
      "type": "n8n-nodes-base.code",
      "position": [
        2064,
        1776
      ]
    },
    {
      "id": "ab3fd821-66e2-4a33-baad-ace7d4f09cd3",
      "name": "Loop Types for Decomposition",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        480,
        2496
      ]
    },
    {
      "id": "6cc8ec9a-c47c-43f2-ab76-de0156948636",
      "name": "Parse Decomposition & Prepare Works",
      "type": "n8n-nodes-base.code",
      "position": [
        752,
        2496
      ]
    },
    {
      "id": "687a5af6-0c84-4a55-874b-447f8450da78",
      "name": "Has Work Items?",
      "type": "n8n-nodes-base.if",
      "position": [
        944,
        2496
      ]
    },
    {
      "id": "e0a41c0a-e0c8-4ee4-a010-01e3421242bd",
      "name": "Loop Work Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1232,
        2304
      ]
    },
    {
      "id": "3c69f7db-5584-4b54-8318-f724ee17ab41",
      "name": "STAGE 6 - Map Rate Units to BIM",
      "type": "n8n-nodes-base.code",
      "position": [
        2112,
        2336
      ]
    },
    {
      "id": "1ef6b653-2b6e-4d10-84ba-292b054b81e0",
      "name": "Accumulate Work Results",
      "type": "n8n-nodes-base.code",
      "position": [
        2112,
        2528
      ]
    },
    {
      "id": "750eb7c4-ce7f-4f6a-92b2-75d9085a1214",
      "name": "Aggregate Type Works",
      "type": "n8n-nodes-base.code",
      "position": [
        1392,
        2784
      ]
    },
    {
      "id": "5db5ec89-6d81-4171-a6e7-a3d65e1d82be",
      "name": "Store Type Result",
      "type": "n8n-nodes-base.code",
      "position": [
        2144,
        2928
      ]
    },
    {
      "id": "0b45cb0c-a97b-4be7-a7c7-7fd1506a7b20",
      "name": "Handle No Works",
      "type": "n8n-nodes-base.code",
      "position": [
        1392,
        2928
      ]
    },
    {
      "id": "ff39ae0f-2a36-48b4-933c-63323dcfe2af",
      "name": "STAGE 8 - Aggregate by Phases",
      "type": "n8n-nodes-base.code",
      "position": [
        1072,
        3184
      ]
    },
    {
      "id": "24e5f83f-7918-4726-b471-5c59f311dd47",
      "name": "STAGE 7 - Calculate Costs",
      "type": "n8n-nodes-base.code",
      "position": [
        1952,
        2528
      ]
    },
    {
      "id": "e89f224d-5f74-42cb-beb6-ebf7cc6c72e8",
      "name": "STAGE 9 - Generate Cost Estimate",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        3184
      ]
    },
    {
      "id": "d65685c1-3e6d-47d0-bb56-6a7eee3db738",
      "name": "STAGE 7.5 - Parse Validation",
      "type": "n8n-nodes-base.code",
      "position": [
        2000,
        2784
      ]
    },
    {
      "id": "655c7134-7658-47ac-b251-6a47f342715f",
      "name": "STAGE 5.1 - Prepare Search Strategies1",
      "type": "n8n-nodes-base.code",
      "position": [
        1376,
        2336
      ]
    },
    {
      "id": "264f273d-cb23-4734-a5d5-944d3f234d15",
      "name": "STAGE 5.2 - Parse Results",
      "type": "n8n-nodes-base.code",
      "position": [
        1952,
        2336
      ]
    },
    {
      "id": "ac07d2b6-c533-4440-bcaf-10d05302212a",
      "name": "Save to Project Folder",
      "type": "n8n-nodes-base.code",
      "position": [
        1472,
        3184
      ]
    },
    {
      "id": "1f57f43b-4382-4869-8396-5a265fa7cb73",
      "name": "Write HTML File",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        1648,
        3296
      ]
    },
    {
      "id": "a79081a6-9633-4ce0-9aa3-8f741587d9be",
      "name": "CONFIG - AI Classify",
      "type": "n8n-nodes-base.set",
      "position": [
        768,
        1472
      ]
    },
    {
      "id": "d4cba1b9-7555-482f-87af-06815dc078b7",
      "name": "AI Classify Categories",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        896,
        1472
      ]
    },
    {
      "id": "7b9a07e7-6fe0-413a-9f78-3dc378e63c61",
      "name": "CONFIG - AI Headers",
      "type": "n8n-nodes-base.set",
      "position": [
        1344,
        1104
      ]
    },
    {
      "id": "11bbad47-f80d-49de-9b65-1976f521d66a",
      "name": "AI Analyze All Headers",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1456,
        1104
      ]
    },
    {
      "id": "8d401ecb-18b4-47e6-96b4-48e488a1619e",
      "name": "CONFIG - STAGE 1",
      "type": "n8n-nodes-base.set",
      "position": [
        1872,
        1456
      ]
    },
    {
      "id": "32191714-ffc9-4da0-93ac-286eb955587c",
      "name": "STAGE 1 - Detect Project Type",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1984,
        1456
      ]
    },
    {
      "id": "88f30a10-d71f-4c04-b80a-fdc560dbc7c6",
      "name": "CONFIG - STAGE 2",
      "type": "n8n-nodes-base.set",
      "position": [
        656,
        1776
      ]
    },
    {
      "id": "1c70d0ca-c473-4112-9910-d68547aca9f4",
      "name": "STAGE 2 - Generate Construction Phases",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        784,
        1776
      ]
    },
    {
      "id": "d05fa841-d1eb-490c-95ee-a508901f0f9c",
      "name": "CONFIG - STAGE 4",
      "type": "n8n-nodes-base.set",
      "position": [
        768,
        2272
      ]
    },
    {
      "id": "7fe776fc-ab83-4d9f-8a12-1d9ba0a4b13c",
      "name": "STAGE 4 - Decompose Type to Works",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        880,
        2272
      ]
    },
    {
      "id": "634179c4-6ea4-4d20-8df8-8f7a80dc681e",
      "name": "CONFIG - STAGE 7.5",
      "type": "n8n-nodes-base.set",
      "position": [
        1600,
        2784
      ]
    },
    {
      "id": "47918aa9-e57f-4f64-b6ea-c5819183ccd3",
      "name": "STAGE 7.5 - Validate Type Works",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1728,
        2784
      ]
    },
    {
      "id": "cb85bee0-e5f9-4b42-866c-fdc70db63ddd",
      "name": "Write XLS File",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        1664,
        3152
      ]
    },
    {
      "id": "7a3fc3da-4e28-4ad3-8794-af6d7dd3086d",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        352,
        3376
      ]
    },
    {
      "id": "03bf88fa-7768-49f9-bdc7-736edd689357",
      "name": "Anthropic Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        352,
        3200
      ]
    },
    {
      "id": "5acd0b0f-4fb0-4c70-b94f-dc4fc2fb472e",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        192,
        3200
      ]
    },
    {
      "id": "0d303c9a-12c7-43a7-8242-9eb3d5cea0aa",
      "name": "xAI Grok Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatXAiGrok",
      "position": [
        192,
        3376
      ]
    },
    {
      "id": "8c424e84-3e21-4735-97b3-557f19f38c40",
      "name": "Open HTML in Browser",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        1824,
        3296
      ]
    },
    {
      "id": "e87484f7-9c19-4537-8dc9-9fc58ee22518",
      "name": "STAGE 5.1 - Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        1648,
        2512
      ]
    },
    {
      "id": "afb9f11d-87f1-4c36-88b9-90b94a650ced",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        176
      ],
      "parameters": {
        "width": 356,
        "height": 132,
        "content": "⭐ **If you find our tools helpful**, please consider **starring our repository** on [GitHub](https://github.com/datadrivenconstruction/OpenConstructionEstimate-DDC-CWICR). \n\nYour support helps us impr"
      }
    },
    {
      "id": "f30ffe46-34d0-4b9f-accd-eb2e92a3a2eb",
      "name": "Header",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        0
      ],
      "parameters": {
        "width": 2152,
        "height": 144,
        "content": "## 🚀 CAD (BIM) Cost Estimation Pipeline with DDC CWICR (for Revit 2015-2026)\n**Automated cost estimation from Revit/BIM models**\nDataDrivenConstruction [GitHub](https://github.com/datadrivenconstructi"
      }
    },
    {
      "id": "399d3cbc-2cd4-48fd-9c94-a6247c329af1",
      "name": "Configuration",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        160
      ],
      "parameters": {
        "width": 512,
        "height": 804,
        "content": "## ⚙️ Configuration\n\nConfigure these settings before running:\n\n**Setup - Define file paths:**\n- `path_to_converter` — Path to RvtExporter.exe\n- `project_file` — Path to .rvt file\n\n## language_code\n- *"
      }
    },
    {
      "id": "26062010-2431-4080-9af5-d53e9ba4832c",
      "name": "Block 1 - Conversion",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        160
      ],
      "parameters": {
        "width": 1336,
        "height": 796,
        "content": "## Block 1: Conversion Block\n\nThis block:\n- Checks if Excel file exists from Revit project\n- If not, runs converter to extract BIM data\n- If yes, skips conversion to save time\n\n**Key nodes:**\n- Check "
      }
    },
    {
      "id": "12edc155-01dd-49da-8e1a-e8cf532eebd6",
      "name": "Block 2 - Data Loading",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        992
      ],
      "parameters": {
        "width": 280,
        "height": 664,
        "content": "## Block 2: Data Loading & AI Classification\n\nThis block:\n- Loads Excel data with BIM elements\n- Filters 3D View elements only\n- AI analyzes headers and decides aggregation rules\n- Groups data by Type"
      }
    },
    {
      "id": "b43cba69-0975-470e-ac4f-7176da2feecf",
      "name": "Block 3 - Stages 0-3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        1680
      ],
      "parameters": {
        "width": 280,
        "height": 356,
        "content": "## Block 3: Project Analysis (Stages 0-3)\n\nThis block:\n- **STAGE 0:** Collects filtered BIM data\n- **STAGE 1:** AI detects project type (Residential/Commercial/Industrial)\n- **STAGE 2:** AI generates "
      }
    },
    {
      "id": "ed3e6dc9-a5b7-4e99-8ed6-3bae51864eb6",
      "name": "Block 4 - Decomposition",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        2048
      ],
      "parameters": {
        "width": 744,
        "height": 684,
        "content": ""
      }
    },
    {
      "id": "6d104b01-8d1a-4e59-ad02-8fd0e9037a2d",
      "name": "Block 5 - Pricing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        2048
      ],
      "parameters": {
        "width": 1092,
        "height": 684,
        "content": "## Block 5: Pricing & Calculation (Stages 5-7)\n\nThis block:\n- **STAGE 5:** Vector search in Qdrant for pricing rates\n- **STAGE 6:** Maps BIM units → Rate units (m² → 100 m²)\n- **STAGE 7:** Calculates "
      }
    },
    {
      "id": "32e11d4f-e58d-4bc3-8a72-7f7aa4799847",
      "name": "Block 6 - Validation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        2752
      ],
      "parameters": {
        "width": 1616,
        "height": 332,
        "content": "## Block 6: Validation & Aggregation\n\nThis block:\n- **STAGE 7.5:** AI validates work completeness\n- Checks for duplications and missing works\n- Aggregates results by type\n- **STAGE 8:** Aggregates all"
      }
    },
    {
      "id": "bf71a213-dbf1-4f2b-975c-0b4aea9c99bd",
      "name": "Block 7 - Reports",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        3136
      ],
      "parameters": {
        "width": 1288,
        "height": 436,
        "content": "## Block 7: Report Generation\n\nThis block:\n- **STAGE 9:** Generates professional HTML report\n- Creates Excel-compatible XLS file\n- Saves to project folder\n- Opens HTML in browser\n\n**Features:**\n- Qual"
      }
    },
    {
      "id": "8b516af2-adaf-4621-b479-ac32802f5aaf",
      "name": "LLM Models",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        2752
      ],
      "parameters": {
        "width": 504,
        "height": 816,
        "content": "## 🧠 Available AI Models\n\nConnect any model to LLM Chain nodes:\n\n- **OpenAI** — GPT-4o (default)\n- **Anthropic** — Claude 3.5\n- **Google Gemini** — Gemini Pro\n- **OpenRouter** — Multiple models\n- **xA"
      }
    },
    {
      "id": "909e24ad-f23d-493d-8e53-565573349432",
      "name": "Pipeline Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        160
      ],
      "parameters": {
        "width": 268,
        "height": 300,
        "content": "## 📊 Pipeline Overview\n\n| Stage | Description |\n|-------|-------------|\n| 0 | Collect BIM data |\n| 1 | Detect project type |\n| 2 | Generate phases |\n| 3 | Assign types to phases |\n| 4 | Decompose to w"
      }
    },
    {
      "id": "c5a7f161-9e5c-4231-8baa-2cf33aad8d6b",
      "name": "Output Files",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        3344
      ],
      "parameters": {
        "width": 308,
        "height": 172,
        "content": "## 📁 Output Files\n\nSaved to project folder:\n```\nproject_2024-12-08.html\nproject_2024-12-08.xls\n```"
      }
    },
    {
      "id": "e1bfa371-8021-4b4c-b4c4-642e90b858e0",
      "name": "Block 2 - Data Loading1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        992
      ],
      "parameters": {
        "width": 1864,
        "height": 664,
        "content": ""
      }
    },
    {
      "id": "dd8eb1e6-5f13-4035-b27f-e334d345ca60",
      "name": "Block 3 - Stages 0-",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        1680
      ],
      "parameters": {
        "width": 1864,
        "height": 356,
        "content": ""
      }
    },
    {
      "id": "a67b0b43-e46f-4943-96ca-a033c715c6f8",
      "name": "Block 4 - Decomposition1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        2048
      ],
      "parameters": {
        "width": 280,
        "height": 684,
        "content": "## Block 4: Work Decomposition Loop\n\nThis block processes each BIM type:\n\n1. **STAGE 4:** AI decomposes type into work items\n2. Loop through each work item\n3. Prepare search queries for pricing\n\n**Exa"
      }
    },
    {
      "id": "50429dc7-2570-43d5-8c67-f5c36a82ce58",
      "name": "DeepSeek Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "position": [
        496,
        3376
      ]
    },
    {
      "id": "8888b38c-d023-4881-9440-efa6e64dda1f",
      "name": "OpenAI LLM",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        496,
        3200
      ]
    },
    {
      "id": "0437d044-9907-4cc8-a8a6-20f6d1d34ebd",
      "name": "Save Type Before LLM",
      "type": "n8n-nodes-base.code",
      "position": [
        592,
        2272
      ]
    },
    {
      "id": "56648eeb-40d5-4037-af02-087f6fb63014",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1344,
        1024
      ],
      "parameters": {
        "width": 336,
        "height": 112,
        "content": "### 🤖 AI Classification \nof parameters for selecting the aggregation method"
      }
    },
    {
      "id": "200332c3-be2f-440a-96c0-724a7b7a5257",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        1408
      ],
      "parameters": {
        "width": 352,
        "height": 128,
        "content": "### 🤖  AI classification \n(optional) highlighting of building elements"
      }
    },
    {
      "id": "9e3d1e70-bc93-4d5e-a760-744be8d264bb",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        1392
      ],
      "parameters": {
        "width": 336,
        "height": 144,
        "content": "### 🤖 AI Project Type Detection \n(renovation, construction, demolition)"
      }
    },
    {
      "id": "2e90afd6-2aa3-4b81-ba77-af3cae17b585",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        1696
      ],
      "parameters": {
        "width": 352,
        "height": 96,
        "content": "### 🤖 AI Developing \na step-by-step work plan"
      }
    },
    {
      "id": "832c18c0-2f7f-4fd2-be2a-7f90c42a1a08",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1488,
        1696
      ],
      "parameters": {
        "width": 352,
        "height": 96,
        "content": "### 🤖 AI Mapping\nElement Types → Work Plan Stages"
      }
    },
    {
      "id": "284a3f0e-e9f8-4140-bb96-e077d9e1dd9a",
      "name": "Export All Outputs",
      "type": "n8n-nodes-base.code",
      "position": [
        2016,
        3296
      ]
    },
    {
      "id": "c78c2c17-ed39-439c-b808-9dd542f148b6",
      "name": "Write Output File",
      "type": "n8n-nodes-base.writeBinaryFile",
      "position": [
        2160,
        3296
      ]
    },
    {
      "id": "05708147-39ff-41a2-b3fc-e711095e6c03",
      "name": "STAGE 2.5 - Compact Types1",
      "type": "n8n-nodes-base.code",
      "position": [
        1280,
        1776
      ]
    },
    {
      "id": "2eb14aba-76e0-4bc3-93ba-693e6206d998",
      "name": "CONFIG - STAGE 5",
      "type": "n8n-nodes-base.set",
      "position": [
        1488,
        1776
      ]
    },
    {
      "id": "b929d3f9-ac46-4c93-8a16-aa49600d912a",
      "name": "STAGE 3 - Assign Types to Phases1",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1616,
        1776
      ]
    },
    {
      "id": "355183bc-2361-412c-8ba6-0a689dff8295",
      "name": "Rate Limit Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1520,
        2336
      ]
    },
    {
      "id": "a06f585f-5b3c-4eb5-973b-980992b0a76e",
      "name": "Limit to 10 Groups",
      "type": "n8n-nodes-base.code",
      "position": [
        2112,
        1104
      ]
    },
    {
      "id": "224486e8-f669-499a-ab5c-467803d9a091",
      "name": "Output Files1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1984,
        3136
      ],
      "parameters": {
        "width": 324,
        "height": 428,
        "content": "## 📁 Debug node`s output "
      }
    },
    {
      "id": "d5394625-dd49-465d-92fd-ee06c1f10c77",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        2208
      ],
      "parameters": {
        "width": 336,
        "height": 128,
        "content": "### 🤖 AI work-scope generation\nfrom building element types"
      }
    },
    {
      "id": "112df327-a0a7-4710-9865-202ec9659bcd",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        2272
      ],
      "parameters": {
        "width": 224,
        "height": 96,
        "content": "### 🔍 Search for jobs ✨\n in a vector database "
      }
    },
    {
      "id": "f151627a-8d47-47aa-b5ef-4929dd6d4758",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        2720
      ],
      "parameters": {
        "width": 352,
        "height": 96,
        "content": "### 🤖 AI verification of the quality \nof received data"
      }
    },
    {
      "id": "83a0ea30-510b-45a9-965c-ae9119c26b08",
      "name": "Configuration1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        480
      ],
      "parameters": {
        "width": 272,
        "height": 484,
        "content": "## ⚡️ Execute workflow\n"
      }
    },
    {
      "id": "144e6d2d-8c7b-4a70-8afc-83ebd89218f1",
      "name": "STAGE 5.1 - Vector Search",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        1648,
        2336
      ]
    },
    {
      "id": "750f9888-96df-4131-b3bb-55e6f4b0baa6",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1904,
        2064
      ],
      "parameters": {
        "width": 368,
        "height": 256,
        "content": "### 📥 To enable vector database search, you need to:\n\n- Install the open-source Qdrant instance on your local machine or a VPS.\n- Fill in the Qdrant credentials in your workflow.\n- Upload the required"
      }
    },
    {
      "id": "17e47c59-bc66-4a8c-9ac1-95a62c495283",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        2496
      ],
      "parameters": {
        "width": 304,
        "height": 128,
        "content": "### 🤖 AI translate\nText-qery in emmbeding"
      }
    },
    {
      "id": "784cf12e-fa89-42db-b2af-a3de5bcfe575",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2320,
        160
      ],
      "parameters": {
        "width": 384,
        "height": 848,
        "content": "## ⚠️ n8n 2.0+ Setup Required ⚠️\n\n**Execute Command node is disabled by default in n8n 2.0+**\n\nWithout setup below, this workflow **won't work!**\n---\n\n### 🪟 Windows\n\n**Option 1 — each launch:**\n```\nse"
      }
    }
  ],
  "connections": {
    "OpenAI LLM": {
      "ai_languageModel": [
        [
          {
            "node": "STAGE 7.5 - Validate Type Works",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "STAGE 2 - Generate Construction Phases",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "STAGE 1 - Detect Project Type",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Classify Categories",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Analyze All Headers",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "STAGE 3 - Assign Types to Phases1",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "STAGE 4 - Decompose Type to Works",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Parse Excel1": {
      "main": [
        [
          {
            "node": "On the standard 3D View",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Handle No Works": {
      "main": [
        [
          {
            "node": "Store Type Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Work Items?": {
      "main": [
        [
          {
            "node": "Loop Work Items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Handle No Works",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Work Items": {
      "main": [
        [
          {
            "node": "Aggregate Type Works",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "STAGE 5.1 - Prepare Search Strategies1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit Wait": {
      "main": [
        [
          {
            "node": "STAGE 5.1 - Vector Search",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Parameters1": {
      "main": [
        [
          {
            "node": "Read Excel File1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write HTML File": {
      "main": [
        [
          {
            "node": "Open HTML in Browser",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFIG - STAGE 1": {
      "main": [
        [
          {
            "node": "STAGE 1 - Detect Project Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFIG - STAGE 2": {
      "main": [
        [
          {
            "node": "STAGE 2 - Generate Construction Phases",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFIG - STAGE 4": {
      "main": [
        [
          {
            "node": "STAGE 4 - Decompose Type to Works",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFIG - STAGE 5": {
      "main": [
        [
          {
            "node": "STAGE 3 - Assign Types to Phases1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read Excel File1": {
      "main": [
        [
          {
            "node": "Parse Excel1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Type Result": {
      "main": [
        [
          {
            "node": "Loop Types for Decomposition",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFIG - STAGE 7.5": {
      "main": [
        [
          {
            "node": "STAGE 7.5 - Validate Type Works",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Export All Outputs": {
      "main": [
        [
          {
            "node": "Write Output File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If - File exists?1": {
      "main": [
        [
          {
            "node": "Info - Skip conversion1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Extract - Run converter1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFIG - AI Headers": {
      "main": [
        [
          {
            "node": "AI Analyze All Headers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Type Works": {
      "main": [
        [
          {
            "node": "CONFIG - STAGE 7.5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "CONFIG - AI Classify": {
      "main": [
        [
          {
            "node": "AI Classify Categories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Category Fields": {
      "main": [
        [
          {
            "node": "CONFIG - AI Classify",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Building Element1": {
      "main": [
        [
          {
            "node": "STAGE 0 - Collect BIM Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Non-Building Elements Output1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Open HTML in Browser": {
      "main": [
        [
          {
            "node": "Export All Outputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process AI Response1": {
      "main": [
        [
          {
            "node": "Group Data with AI Rules1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Type Before LLM": {
      "main": [
        [
          {
            "node": "CONFIG - STAGE 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Analyze All Headers": {
      "main": [
        [
          {
            "node": "Process AI Response1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Classify Categories": {
      "main": [
        [
          {
            "node": "Apply Classification to Groups",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Stage 2 - Phases": {
      "main": [
        [
          {
            "node": "STAGE 2.5 - Compact Types1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 5.1 - Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "STAGE 5.1 - Vector Search",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Save to Project Folder": {
      "main": [
        [
          {
            "node": "Write HTML File",
            "type": "main",
            "index": 0
          },
          {
            "node": "Write XLS File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Accumulate Work Results": {
      "main": [
        [
          {
            "node": "Loop Work Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Info - Skip conversion1": {
      "main": [
        [
          {
            "node": "Merge - Continue workflow1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On the standard 3D View": {
      "main": [
        [
          {
            "node": "Extract Headers and Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Non-3D View Elements Output1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create - Excel filename1": {
      "main": [
        [
          {
            "node": "Check - Does Excel file exist?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract - Run converter1": {
      "main": [
        [
          {
            "node": "Check - Did extraction succeed?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Headers and Data": {
      "main": [
        [
          {
            "node": "CONFIG - AI Headers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Group Data with AI Rules1": {
      "main": [
        [
          {
            "node": "Find Category Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 5.1 - Vector Search": {
      "main": [
        [
          {
            "node": "STAGE 5.2 - Parse Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 5.2 - Parse Results": {
      "main": [
        [
          {
            "node": "STAGE 6 - Map Rate Units to BIM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 7 - Calculate Costs": {
      "main": [
        [
          {
            "node": "Accumulate Work Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge - Continue workflow1": {
      "main": [
        [
          {
            "node": "Set Parameters1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 0 - Collect BIM Data": {
      "main": [
        [
          {
            "node": "CONFIG - STAGE 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 2.5 - Compact Types1": {
      "main": [
        [
          {
            "node": "CONFIG - STAGE 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Setup - Define file paths1": {
      "main": [
        [
          {
            "node": "Configure Language & Vector DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Types for Decomposition": {
      "main": [
        [
          {
            "node": "STAGE 8 - Aggregate by Phases",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Save Type Before LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Stage 1 - Project Type": {
      "main": [
        [
          {
            "node": "CONFIG - STAGE 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 7.5 - Parse Validation": {
      "main": [
        [
          {
            "node": "Store Type Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error - Show what went wrong1": {
      "main": [
        [
          {
            "node": "Merge - Continue workflow1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "STAGE 1 - Detect Project Type": {
      "main": [
        [
          {
            "node": "Parse Stage 1 - Project Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 8 - Aggregate by Phases": {
      "main": [
        [
          {
            "node": "STAGE 9 - Generate Cost Estimate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply Classification to Groups": {
      "main": [
        [
          {
            "node": "Is Building Element1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure Language & Vector DB": {
      "main": [
        [
          {
            "node": "Create - Excel filename1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check - Does Excel file exist?1": {
      "main": [
        [
          {
            "node": "If - File exists?1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Stage 3 - Final Structure": {
      "main": [
        [
          {
            "node": "Prepare Types for Decomposition",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Types for Decomposition": {
      "main": [
        [
          {
            "node": "Loop Types for Decomposition",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 6 - Map Rate Units to BIM": {
      "main": [
        [
          {
            "node": "STAGE 7 - Calculate Costs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 7.5 - Validate Type Works": {
      "main": [
        [
          {
            "node": "STAGE 7.5 - Parse Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check - Did extraction succeed?1": {
      "main": [
        [
          {
            "node": "Error - Show what went wrong1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Set xlsx_filename after success1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 9 - Generate Cost Estimate": {
      "main": [
        [
          {
            "node": "Save to Project Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set xlsx_filename after success1": {
      "main": [
        [
          {
            "node": "Merge - Continue workflow1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Setup - Define file paths1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 3 - Assign Types to Phases1": {
      "main": [
        [
          {
            "node": "Parse Stage 3 - Final Structure",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 4 - Decompose Type to Works": {
      "main": [
        [
          {
            "node": "Parse Decomposition & Prepare Works",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Decomposition & Prepare Works": {
      "main": [
        [
          {
            "node": "Has Work Items?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 2 - Generate Construction Phases": {
      "main": [
        [
          {
            "node": "Parse Stage 2 - Phases",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "STAGE 5.1 - Prepare Search Strategies1": {
      "main": [
        [
          {
            "node": "Rate Limit Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}