Library / Building Blocks & Utilities
Building Blocks & Utilities
Calculate the Centroid of Vectors via Webhook
When a webhook receives a set of vectors, it validates them, computes their centroid and returns the result.
What it does
📌 Description: This node performs vector validation and centroid computation. - Validation: Ensures all vectors have the same number of dimensions. - Computation: Averages each dimension to determine the centroid. - If validation fails: Returns an error message indicating inconsistent dimensions. 🔹 Successful Output Example: json { "centroid": [4,5,6] } 🔹 Error Output Example: json { "error": "Vectors have inconsistent dimensions." }
The steps
- Receive Vectors
- Extract & Parse Vectors
- Validate & Compute Centroid
- Return Centroid Response
Similar automations
Building Blocks & UtilitiesCalculate a Vector Centroid via Webhook15 stepsRAG & Knowledge BasesStore Notion Pages as Vectors in Supabase with OpenAI8 stepsLead Generation & EnrichmentExtract Person Data and Calculate ICP Score with Airtop9 stepsLead Generation & EnrichmentExtract Company Data and Calculate ICP Score9 steps