{
  "id": "fgQgNpXb2YQnLXjA",
  "name": "n8n_8_Revit_IFC_DWG_Conversation_EXTRACT_Phase_with_Parse_XLSX",
  "tags": [],
  "nodes": [
    {
      "id": "fc85a630-5560-4345-bb4a-02cb8632bc80",
      "name": "Start - Click to begin",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -656,
        720
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "26b97603-966f-4f03-a3bb-3e0d7a99bb2f",
      "name": "Setup - Define file paths",
      "type": "n8n-nodes-base.set",
      "position": [
        -432,
        720
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9cbd4ec9-df24-41e8-b47a-720a4cdb733b",
              "name": "path_to_revit_converter",
              "type": "string",
              "value": "C:\\Users\\Artem Boiko\\Desktop\\n8n\\cad2data-Revit-IFC-DWG-DGN-pipeline-with-conversion-validation-qto-main\\cad2data-Revit-IFC-DWG-DGN-pipeline-with-conversion-validation-qto-main\\DDC_Converter_Revit\\RvtExporter.exe"
            },
            {
              "id": "aa834467-80fb-476a-bac1-6728478834f0",
              "name": "revit_file",
              "type": "string",
              "value": "C:\\Users\\Artem Boiko\\Desktop\\n8n\\cad2data-Revit-IFC-DWG-DGN-pipeline-with-conversion-validation-qto-main\\cad2data-Revit-IFC-DWG-DGN-pipeline-with-conversion-validation-qto-main\\Sample_Projects\\2023 racbasicsampleproject.rvt"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "09957e4d-78e3-43c5-8c53-73bc70d8cdce",
      "name": "Extract - Run Revit converter",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        -176,
        720
      ],
      "parameters": {
        "command": "=\"{{$json[\"path_to_revit_converter\"]}}\" \"{{$json[\"revit_file\"]}}\""
      },
      "typeVersion": 1,
      "continueOnFail": true
    },
    {
      "id": "b7023aae-b316-47c0-be39-57938aa0c7a4",
      "name": "Check - Did extraction succeed?",
      "type": "n8n-nodes-base.if",
      "position": [
        16,
        720
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "condition1",
              "operator": {
                "type": "object",
                "operation": "exists",
                "rightType": "any"
              },
              "leftValue": "={{ $node[\"Extract - Run Revit converter\"].json.error }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "040addcf-4238-4e7a-a579-893eb4bca48c",
      "name": "Success - Create Excel filename",
      "type": "n8n-nodes-base.set",
      "position": [
        208,
        736
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9cbd4ec9-df24-41e8-b47a-720a4cdb733b",
              "name": "xlsx_filename",
              "type": "string",
              "value": "={{ $node[\"Setup - Define file paths\"].json[\"revit_file\"].slice(0, -4) + \"_rvt.xlsx\" }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b04c4618-1565-4551-b154-b9d4d5aa6b39",
      "name": "Error - Show what went wrong",
      "type": "n8n-nodes-base.set",
      "position": [
        208,
        560
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "error-message-id",
              "name": "error_message",
              "type": "string",
              "value": "=Extraction failed: {{ $node[\"Extract - Run Revit converter\"].json.error || \"Unknown error\" }}"
            },
            {
              "id": "error-code-id",
              "name": "error_code",
              "type": "number",
              "value": "={{ $node[\"Extract - Run Revit converter\"].json.code || -1 }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "6010e598-b0de-415b-b812-3dcbf656dd65",
      "name": "Extract - Read Excel file from disk",
      "type": "n8n-nodes-base.readBinaryFile",
      "position": [
        416,
        736
      ],
      "parameters": {
        "filePath": "={{ $json[\"xlsx_filename\"] }}"
      },
      "typeVersion": 1
    },
    {
      "id": "fabbaaf9-ec88-45eb-866d-e4a3f876a586",
      "name": "Extract - Parse Excel to data",
      "type": "n8n-nodes-base.spreadsheetFile",
      "position": [
        624,
        736
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "1865546f-1253-4ea3-9179-3ebd95ad5189",
      "name": "Extract Phase Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        432
      ],
      "parameters": {
        "color": 6,
        "width": 552,
        "height": 504,
        "content": "## \ud83d\udd37 EXTRACT Phase\n\n**E**xtract data from Revit file:\n1. Setup file paths\n2. Run Revit converter (RVT \u2192 Excel)\n3. Check if conversion succeeded\n4. Read Excel file from disk\n5. Parse Excel into structured data"
      },
      "typeVersion": 1
    },
    {
      "id": "5c9a53b9-1818-4135-b442-f0643d97b645",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        256
      ],
      "parameters": {
        "color": 7,
        "width": 1908,
        "height": 712,
        "content": "# ETL with CAD (BIM)  \n**Extract. Transform. Load \u2014 the future of data processing in construction**\n\nETL (Extract, Transform, Load) is a time-tested and universal approach at the heart of every mature digital infrastructure. When applied to CAD and BIM data, it becomes not just relevant \u2014 but essential.\nETL is more than just a technical process. It\u2019s a mindset shift \u2014 one that takes BIM out of the siloed world of 3D modeling and into the open world of transparent, interoperable, and machine-readable data. It is this paradigm that powers platforms like [DataDrivenConstruction.io](https://datadrivenconstruction.io) and drives the future of digital transformation in the built environment.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "3aa00356-09e3-4e4c-85d0-4a316a3877a2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        112
      ],
      "parameters": {
        "width": 340,
        "height": 132,
        "content": "\u2b50 **If you find our tools helpful**, please **consider starring** our repository on [GitHub](https://github.com/datadrivenconstruction/cad2data-Revit-IFC-DWG-DGN-pipeline-with-conversion-validation-qto). \n\nYour support helps us improve and continue developing open solutions for the community!\n"
      },
      "typeVersion": 1
    },
    {
      "id": "af58225a-0ea4-4c6f-888e-49f1a8c6b319",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        544
      ],
      "parameters": {
        "color": 4,
        "height": 368,
        "content": "## \u2b07\ufe0f Only modify the variables here  \neverything else works automatically"
      },
      "typeVersion": 1
    },
    {
      "id": "14f11329-b954-4675-96e9-f357b1ff7caf",
      "name": "Extract Phase Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        432
      ],
      "parameters": {
        "color": 5,
        "width": 1288,
        "height": 504,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e2f8beb9-da5e-4a40-b0c5-869d2ee67c09",
      "name": "On the standard 3D View",
      "type": "n8n-nodes-base.if",
      "position": [
        832,
        736
      ],
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json['On the standard 3D View'] }}",
              "value2": true
            }
          ]
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5a2ee85e-e76d-48be-850f-8ebb85cfd222",
  "connections": {
    "Start - Click to begin": {
      "main": [
        [
          {
            "node": "Setup - Define file paths",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On the standard 3D View": {
      "main": [
        [],
        []
      ]
    },
    "Setup - Define file paths": {
      "main": [
        [
          {
            "node": "Extract - Run Revit converter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract - Parse Excel to data": {
      "main": [
        [
          {
            "node": "On the standard 3D View",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract - Run Revit converter": {
      "main": [
        [
          {
            "node": "Check - Did extraction succeed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check - Did extraction succeed?": {
      "main": [
        [
          {
            "node": "Error - Show what went wrong",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Success - Create Excel filename",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success - Create Excel filename": {
      "main": [
        [
          {
            "node": "Extract - Read Excel file from disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract - Read Excel file from disk": {
      "main": [
        [
          {
            "node": "Extract - Parse Excel to data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}