[2/3] Set up medoids (2 types) for anomaly detection (crops dataset)

Setting Up Medoids for Anomaly Detection Preparatory workflow to set cluster centres and cluster threshold scores, so anomalies can be detected based on these thresholds Here, we're using two approaches to set up these centres: the upper branch is the "distance matrix approach", and the lower is the "multimodal embedding model approach".

Integrations Used (1)

Workflow Structure (26 nodes)
100%
Http Request
Cluster Distance Matrix
Code
Scipy Sparse Matrix
Http Request
Set medoid id
Http Request
Get Medoid Vector
Set
Prepare for Searching Threshold
Http Request
Searching Score
Set
Threshold Score
Http Request
Set medoid threshold score
Manual Trigger
When clicking ‘Test workflow’
Set
Qdrant cluster variables
Set
Medoids Variables
Set
Text Medoids Variables
Http Request
Total Points in Collection
Set
Textual (visual) crop descriptions
Http Request
Crop Counts
Set
Info About Crop Clusters
Split Out
Split Out1
Split Out
Split Out
Merge
Merge
Http Request
Embed text
Http Request
Get Medoid by Text
Http Request
Set text medoid id
Set
Prepare for Searching Threshold1
Http Request
Searching Text Medoid Score
Set
Threshold Score1
Http Request
Set text medoid threshold score
Node Types:
trigger
http
code
transform
logic
Requires credentials

Prerequisites

Required Credentials (2)

HTTP Header Auth

Used by: Embed text

Docs

Qdrant

Used by: Total Points in Collection, Cluster Distance Matrix +9 more

Docs

Complexity

Advanced

Expert level. Custom code, complex logic, many integrations.

Setup time: ~45 min
Score: 69/100
Custom Code
Conditional Logic

When to Use This Workflow

AI-Powered Content Creation

Automate content generation, summarization, or analysis using AI capabilities.

Save hours of manual work while maintaining quality and consistency.

Real-time Response

React instantly when events happen - new orders, form submissions, or API calls.

Zero delay between trigger and action for time-sensitive workflows.

Error Reduction

Eliminate human error from routine processes with consistent automation.

Improve accuracy and reliability across your workflows.

workflow.json
{
  "id": "m9aACcHqydEbH4nR",
  "meta": {
    "instanceId": "205b3bc06c96f2dc835b4f00e1cbf9a937a74eeb3b47c99d0c30b0586dbf85aa"
  },
  "name": "[2/3] Set up medoids (2 types) for anomaly detection (crops dataset)",
  "tags": [
    {
      "id": "spMntyrlE9ydvWFA",
      "name": "anomaly-detection",
      "createdAt": "2024-12-08T22:05:15.945Z",
      "updatedAt": "2024-12-09T12:50:19.287Z"
    }
  ],
  "nodes": [
    {
      "id": "edaa871e-2b79-400e-8328-333d250bfdd2",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
...

Workflow Details

Nodes
48
Trigger
Manual
Source
awesome
Added
Dec 4, 2025

Need Help?

Check out the official n8n documentation for detailed guides.

Related Workflows

Autonomous AI crawler

Text scraper tool This tool is designed to return all text from the given webpage. 💡 Consider adding proxy for better c...

Toolworkflow
Lmchatopenai
Outputparserstructured
Supabase
38 nodesManual
Curated

Build Your Own Image Search Using AI Object Detection, CDN and ElasticSearchBuild Your Own Image Search Using AI Object Detection, CDN and ElasticSearch

1. Get Source Image [Read more about setting variables for your workflow](https://docs.n8n.io/integrations/builtin/core-...

Http-request
Editimage
Elasticsearch
17 nodesManual
Curated

HN Who is Hiring Scrape

Go to https://hn.algolia.com - filter by "Ask HN: Who is hiring?" (important with quotes for full match) - sort by date...

Lmchatopenai
Outputparserstructured
Http-request
Chainllm
20 nodesManual
Curated

Hacker News to Video Template - AlexK1919

Choose your data source This can be swapped for any other data source of your choosing.

Hackernews
Lmchatopenai
Toolhttprequest
Outputparserstructured
48 nodesManual
Curated

Query Perplexity AI from your n8n workflows

Credentials Setup 1/ Go to the perplexity dashboard, purchase some credits and create an API Key https://www.perplexity....

Http-request
6 nodesManual
Curated

Scrape Trustpilot Reviews with DeepSeek, Analyze Sentiment with OpenAI

Change to the name of the company registered on Trustpilot and the maximum number of pages to scrape

Informationextractor
Http-request
Google-sheets
Sentimentanalysis
20 nodesManual
Curated