Calculate the Centroid of a Set of Vectors
Triggered by a webhook. Connects Code, Respond To Webhook, Webhook. 📌 Description: This node extracts the vectors array from the GET request and converts it into a properly formatted array for processing. - Ensures vectors is a valid array. - If the parameter is missing, it may generate an error. 🔹 Expected Output Example: json { "vectors": [[2,3,4],[4,5,6],[6,7,8]] } 📌 Description: This node perf
Front matter
name: Calculate the Centroid of a Set of Vectors
description: Triggered by a webhook. Connects Code, Respond To Webhook, Webhook. 📌 **Description:** This node extracts the `vectors` array from the **GET request** and converts it into a properly formatted array for processing. - **Ensures `vectors` is a valid array.** - **If the parameter is missing, it may generate an error.** 🔹 **Expected Output Example:** ```json { "vectors": [[2,3,4],[4,5,6],[6,7,8]] } ``` 📌 **Description:** This node performs **vector validation** and **centroid computation**. - **Validation:** Ensures all vectors have the same number o
category: Automation
kind: Workflow
software: Code|Respond To Webhook|WebhookCalculate the Centroid of a Set of Vectors
Triggered by a webhook. Connects Code, Respond To Webhook, Webhook. 📌 Description: This node extracts the vectors array from the GET request and converts it into a properly formatted array for processing.
- Ensures
vectorsis a valid array. - If the parameter is missing, it may generate an error.
🔹 Expected Output Example:
{
"vectors": [[2,3,4],[4,5,6],[6,7,8]]
}📌 Description: This node performs vector validation and centroid computation.
- Validation: Ensures all vectors have the same number o
Steps
- Receive Vectors (webhook)
- Extract & Parse Vectors (set)
- Validate & Compute Centroid (code)
- Return Centroid Response (respondToWebhook)
- Sticky Note (stickyNote)
- Sticky Note1 (stickyNote)
- Sticky Note2 (stickyNote)
- Sticky Note4 (stickyNote)
Import
Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).
Author: Zie619, n8n workflow collection. License: MIT.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
There are more like this in the members library
The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.