{
  "name": "Transform cloud documentation into security baselines with OpenAI and GDrive",
  "nodes": [
    {
      "id": "c76e4bd4-dbdf-4e35-808e-b225e66427e6",
      "name": "check_mandatory_fields",
      "type": "n8n-nodes-base.if",
      "position": [
        -2896,
        112
      ]
    },
    {
      "id": "1cbc1ca7-e5db-4e5a-a1f7-e774a70e1201",
      "name": "generate_uuid",
      "type": "n8n-nodes-base.code",
      "position": [
        -2384,
        -64
      ]
    },
    {
      "id": "1f8f124a-1417-41b7-abf9-177f9a908cac",
      "name": "create",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -3344,
        112
      ]
    },
    {
      "id": "6ede342c-2ad9-41cc-b11c-59186de696ea",
      "name": "settings",
      "type": "n8n-nodes-base.set",
      "position": [
        -1488,
        -64
      ]
    },
    {
      "id": "da40bbec-d7ea-4499-a6d7-09762f81c529",
      "name": "http_get_url",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -816,
        -208
      ]
    },
    {
      "id": "831e22cb-9d60-41a1-b49e-6ce03f0bee9f",
      "name": "html_sanitizer",
      "type": "n8n-nodes-base.code",
      "position": [
        -592,
        -208
      ]
    },
    {
      "id": "a7f30691-60e2-451f-8855-45053ede5980",
      "name": "1_DefySec_Extractor",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -368,
        -208
      ]
    },
    {
      "id": "7278026a-c1ef-49b9-950d-d924e4f2aca9",
      "name": "explode_urls",
      "type": "n8n-nodes-base.code",
      "position": [
        -1264,
        -64
      ]
    },
    {
      "id": "9e8fecb4-99a5-426f-a09b-245d909be212",
      "name": "process_url",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -1040,
        -64
      ]
    },
    {
      "id": "08a7fbde-12c2-4efd-9acf-186a2a61d352",
      "name": "ec_search_files",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        208,
        -208
      ]
    },
    {
      "id": "012ae0a1-1bf0-4a67-9c1c-1de9a3758f07",
      "name": "ec_append_create_filter",
      "type": "n8n-nodes-base.if",
      "position": [
        784,
        -208
      ]
    },
    {
      "id": "53bb7adc-f2c6-4e5d-b6f4-d0d060c9581a",
      "name": "ec_upload_new_file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1008,
        -112
      ]
    },
    {
      "id": "1f9e5eb6-bad4-430e-9998-82a7322dcddf",
      "name": "ec_update_existing_file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1456,
        -208
      ]
    },
    {
      "id": "df8ef747-d3e1-4d5e-a77d-da693f5baf38",
      "name": "ec_download_existing_file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1008,
        -304
      ]
    },
    {
      "id": "42a8de07-049e-4038-b942-d27f7e425bfa",
      "name": "ec_merge_data",
      "type": "n8n-nodes-base.code",
      "position": [
        1232,
        -304
      ]
    },
    {
      "id": "ce20266e-90b4-4d75-b3d4-6777729e7e5f",
      "name": "ec_extract_file_info",
      "type": "n8n-nodes-base.code",
      "position": [
        496,
        -208
      ]
    },
    {
      "id": "cad3694b-fbc6-4d97-a0b5-02f8f2601f89",
      "name": "cc_search_files",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -816,
        -992
      ]
    },
    {
      "id": "1c259737-687a-4862-8052-24290b3f4557",
      "name": "cc_extract_file_info",
      "type": "n8n-nodes-base.code",
      "position": [
        -592,
        -992
      ]
    },
    {
      "id": "2f8fb3d1-5bbd-4d3b-affc-b2090abf83a0",
      "name": "2_DefySec_Control_Composer",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -368,
        -992
      ]
    },
    {
      "id": "8c37cafd-51d0-419b-ba2c-ae0b3b54a8c9",
      "name": "ec_controls_check",
      "type": "n8n-nodes-base.if",
      "position": [
        -16,
        -208
      ]
    },
    {
      "id": "cb935c32-d1b2-4566-baf1-316f95ac26aa",
      "name": "cc_controls_router",
      "type": "n8n-nodes-base.switch",
      "position": [
        -16,
        -992
      ]
    },
    {
      "id": "f1d5fd0e-e481-4b91-af07-804d02098c07",
      "name": "cc_no_controls_answer",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        208,
        -992
      ]
    },
    {
      "id": "c7e68f8c-abe4-443f-a65f-efef1a5e3b6f",
      "name": "3_DefySec Baseline Builder",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        432,
        -800
      ]
    },
    {
      "id": "56553247-2b0d-44ae-a8df-d3c2f42f10ef",
      "name": "cc_controls_check",
      "type": "n8n-nodes-base.code",
      "position": [
        208,
        -800
      ]
    },
    {
      "id": "5ea33aaf-7f97-4ceb-97e0-1023405aad4b",
      "name": "bb_data_prep",
      "type": "n8n-nodes-base.code",
      "position": [
        2144,
        -912
      ]
    },
    {
      "id": "c1e047f4-83f6-45e9-a550-3e54c10eb919",
      "name": "get_gdrive_id",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -2160,
        -64
      ]
    },
    {
      "id": "6a21ef73-0859-4b51-8dc9-11b70af0a8d9",
      "name": "resolve_assistants",
      "type": "n8n-nodes-base.code",
      "position": [
        -1712,
        -64
      ]
    },
    {
      "id": "85305d1a-d4de-4917-9f16-09000677a767",
      "name": "OpenAI_Assistants_List",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1936,
        -64
      ]
    },
    {
      "id": "08f933aa-5892-442a-83c6-5e5d365ca0e0",
      "name": "bb_data_respond",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2320,
        -912
      ]
    },
    {
      "id": "bfd45e14-84e0-44d5-84f8-c90527f2efed",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3312,
        -784
      ],
      "parameters": {
        "width": 608,
        "height": 336,
        "content": "## Overview\nThis template turns provider docs (URLs) into an **auditable security baseline**:\n1) POST **/create** (Basic Auth) → validate & generate `uuid`\n2) Resolve Google Drive folder (search-or-cr"
      }
    },
    {
      "id": "c7496163-e016-4565-ab9e-adf1ce42e0a5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2656,
        -784
      ],
      "parameters": {
        "width": 608,
        "height": 336,
        "content": "## Setup & Credentials\n- **OpenAI**: select your credential (no API keys in HTTP headers)\n- **Google Drive OAuth2**: read/write file\n- **Basic Auth**: protects `/create` endpoint\n\n**Drive folder**\n- A"
      }
    },
    {
      "id": "5a7828b9-f6d5-4636-be1a-a1c69272d0d1",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        -784
      ],
      "parameters": {
        "width": 608,
        "height": 336,
        "content": "## Run & Troubleshooting\n- **Test**: Use “Test Webhook” and POST `{ cloudProvider, technology, urls[] }`.\n- **No results?** Ensure pages return HTML and follow the TXT contracts (3-line Extractor, 7-l"
      }
    },
    {
      "id": "af5efaf9-7e4d-48bb-829f-8a70f479c7d2",
      "name": "input_validation_error",
      "type": "n8n-nodes-base.code",
      "position": [
        -3120,
        112
      ]
    },
    {
      "id": "46c9bb0c-c804-481c-af6e-b9aaf28590b7",
      "name": "validation_failed_answer",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -2672,
        176
      ]
    },
    {
      "id": "d0f2d694-cf7b-4b3d-bbd5-665213decf50",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3392,
        -352
      ],
      "parameters": {
        "width": 928,
        "height": 800,
        "content": "## Ingress and Validation"
      }
    },
    {
      "id": "17fd8f81-3ff6-48af-b909-2d81f8753ebe",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2432,
        -352
      ],
      "parameters": {
        "width": 1088,
        "height": 800,
        "content": "## Gathering Information"
      }
    },
    {
      "id": "187c586e-f431-442b-9323-ea51e77abbc9",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1312,
        -352
      ],
      "parameters": {
        "width": 896,
        "height": 800,
        "content": "## Processing URLs"
      }
    },
    {
      "id": "2ea7d88e-ba2d-4b8b-92ac-5e5e24b2649a",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -352
      ],
      "parameters": {
        "width": 2064,
        "height": 800,
        "content": "## Extracting Controls and Saving in GDrive"
      }
    },
    {
      "id": "fea8f4e5-1c62-4460-8cc5-c7d32878c8f0",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1312,
        -1168
      ],
      "parameters": {
        "width": 1696,
        "height": 800,
        "content": "## Fetching the Controls File & Consolidation"
      }
    },
    {
      "id": "0943865e-4399-4454-8175-bee69dceb660",
      "name": "4_DefySec_Baseline_Auditor",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        960,
        -800
      ]
    },
    {
      "id": "0fdb70de-16df-4789-acc5-85503bc85792",
      "name": "ba_controls_check",
      "type": "n8n-nodes-base.if",
      "position": [
        1312,
        -800
      ]
    },
    {
      "id": "cbb18734-a691-4d10-8410-4f37978679a6",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -1168
      ],
      "parameters": {
        "width": 1664,
        "height": 800,
        "content": "## Building a Baseline with the Self Evaluation Technique"
      }
    },
    {
      "id": "eaea2cf3-2298-46f6-ad86-6ac3ff3b6cc6",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2096,
        -1168
      ],
      "parameters": {
        "width": 448,
        "height": 800,
        "content": "## Preparing Data & Providing Answers"
      }
    },
    {
      "id": "2a940c07-448e-449b-8909-c9ae1b6283e5",
      "name": "ba_prep_feedback",
      "type": "n8n-nodes-base.code",
      "position": [
        1536,
        -720
      ]
    },
    {
      "id": "0ef89bc7-48f4-4f8c-a72b-a22e76c5c5ec",
      "name": "5_DefySec Baseline Revisor",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1744,
        -720
      ]
    },
    {
      "id": "1ca102f6-6345-4dfd-a55e-113e94ee70d0",
      "name": "controls_transfer_area",
      "type": "n8n-nodes-base.set",
      "position": [
        768,
        -800
      ]
    }
  ],
  "connections": {
    "create": {
      "main": [
        [
          {
            "node": "input_validation_error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "settings": {
      "main": [
        [
          {
            "node": "explode_urls",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "process_url": {
      "main": [
        [
          {
            "node": "cc_search_files",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "http_get_url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bb_data_prep": {
      "main": [
        [
          {
            "node": "bb_data_respond",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "explode_urls": {
      "main": [
        [
          {
            "node": "process_url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "http_get_url": {
      "main": [
        [
          {
            "node": "html_sanitizer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec_merge_data": {
      "main": [
        [
          {
            "node": "ec_update_existing_file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "generate_uuid": {
      "main": [
        [
          {
            "node": "get_gdrive_id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get_gdrive_id": {
      "main": [
        [
          {
            "node": "OpenAI_Assistants_List",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "html_sanitizer": {
      "main": [
        [
          {
            "node": "1_DefySec_Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cc_search_files": {
      "main": [
        [
          {
            "node": "cc_extract_file_info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec_search_files": {
      "main": [
        [
          {
            "node": "ec_extract_file_info",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ba_prep_feedback": {
      "main": [
        [
          {
            "node": "5_DefySec Baseline Revisor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ba_controls_check": {
      "main": [
        [
          {
            "node": "bb_data_prep",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ba_prep_feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cc_controls_check": {
      "main": [
        [
          {
            "node": "3_DefySec Baseline Builder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec_controls_check": {
      "main": [
        [
          {
            "node": "ec_search_files",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "process_url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cc_controls_router": {
      "main": [
        [
          {
            "node": "cc_no_controls_answer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "cc_controls_check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec_upload_new_file": {
      "main": [
        [
          {
            "node": "process_url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "resolve_assistants": {
      "main": [
        [
          {
            "node": "settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1_DefySec_Extractor": {
      "main": [
        [
          {
            "node": "ec_controls_check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cc_extract_file_info": {
      "main": [
        [
          {
            "node": "2_DefySec_Control_Composer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec_extract_file_info": {
      "main": [
        [
          {
            "node": "ec_append_create_filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI_Assistants_List": {
      "main": [
        [
          {
            "node": "resolve_assistants",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check_mandatory_fields": {
      "main": [
        [
          {
            "node": "generate_uuid",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "validation_failed_answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "controls_transfer_area": {
      "main": [
        [
          {
            "node": "4_DefySec_Baseline_Auditor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "input_validation_error": {
      "main": [
        [
          {
            "node": "check_mandatory_fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec_append_create_filter": {
      "main": [
        [
          {
            "node": "ec_download_existing_file",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ec_upload_new_file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec_update_existing_file": {
      "main": [
        [
          {
            "node": "process_url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ec_download_existing_file": {
      "main": [
        [
          {
            "node": "ec_merge_data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2_DefySec_Control_Composer": {
      "main": [
        [
          {
            "node": "cc_controls_router",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3_DefySec Baseline Builder": {
      "main": [
        [
          {
            "node": "controls_transfer_area",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4_DefySec_Baseline_Auditor": {
      "main": [
        [
          {
            "node": "ba_controls_check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5_DefySec Baseline Revisor": {
      "main": [
        [
          {
            "node": "controls_transfer_area",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}