{
  "name": "Calculate the centroid of a set of vectors",
  "nodes": [
    {
      "id": "32a8aa56-aa7e-4c9e-a39e-f65234224bcf",
      "name": "Receive Vectors",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -440,
        20
      ]
    },
    {
      "id": "a020a49a-cc9f-49af-aa95-829d9d16da04",
      "name": "Extract & Parse Vectors",
      "type": "n8n-nodes-base.set",
      "position": [
        360,
        20
      ]
    },
    {
      "id": "2f328de6-4ef1-4aac-8838-d616637f4b88",
      "name": "Validate & Compute Centroid",
      "type": "n8n-nodes-base.code",
      "position": [
        960,
        20
      ]
    },
    {
      "id": "821bc173-3578-4cf2-9fd7-8ea9cba8dc3f",
      "name": "Return Centroid Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1640,
        20
      ]
    },
    {
      "id": "73964e7b-1217-422f-8078-09604fa2a3d7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -200
      ],
      "parameters": {
        "width": 620,
        "height": 420,
        "content": "📌 **Description:**  \nThis node extracts the `vectors` array from the **GET request** and converts it into a properly formatted array for processing.  \n- **Ensures `vectors` is a valid array.**  \n- **I"
      }
    },
    {
      "id": "e4793b20-bfa6-4b08-b46c-f92d1c9c2622",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -280
      ],
      "parameters": {
        "width": 700,
        "height": 500,
        "content": "📌 **Description:**  \nThis node performs **vector validation** and **centroid computation**.  \n- **Validation:** Ensures all vectors have the same number of dimensions.  \n- **Computation:** Averages ea"
      }
    },
    {
      "id": "e0ac1c4d-0435-44d1-ba87-0cfc9dea207b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1340,
        -200
      ],
      "parameters": {
        "width": 680,
        "height": 420,
        "content": "📌 **Description:**  \nThis node sends the **final response** back to the client that made the request.  \n- **If the computation is successful**, it returns the centroid.  \n- **If an error occurs**, it "
      }
    },
    {
      "id": "2b4fbae7-c2e5-4666-ba9f-72a5313fc16f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -820,
        -200
      ],
      "parameters": {
        "width": 840,
        "height": 420,
        "content": "📌 **Description:**  \nThis node acts as the **entry point** for the workflow, receiving a **GET request** containing an array of vectors in the `vectors` parameter.  \n- **Expected Input:** `vectors` pa"
      }
    }
  ],
  "connections": {
    "Receive Vectors": {
      "main": [
        [
          {
            "node": "Extract & Parse Vectors",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract & Parse Vectors": {
      "main": [
        [
          {
            "node": "Validate & Compute Centroid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate & Compute Centroid": {
      "main": [
        [
          {
            "node": "Return Centroid Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}