n8n

How to Automate Qdrant Crop Anomaly Detection?

Use this n8n build to spot images that do not match your crop library. You send an image URL and get a clear message that says which crop it most likely matches or if it is an outlier. Data teams and ops leads use it to keep training data clean and to screen uploads fast.

The flow starts with an Execute Workflow Trigger that receives the image URL. A Voyage AI call turns the image into a vector using the voyage multimodal model. The workflow then queries your Qdrant collection and checks similarity against the medoid for each crop class, using the thresholds stored with those centers. Set nodes hold your Qdrant URL, collection name, and center types so you can switch between medoid and text anchor medoid. A code step compares the highest score to the correct threshold type and returns a simple text result. The number of crop classes is pulled from Qdrant, so the query always covers all labels.

You will need a Qdrant cluster with your crop data and thresholds already loaded, plus a Voyage AI API key. Expect faster reviews, fewer manual checks, and easy scaling as you add new crops. This setup works well for dataset curation, field upload screening, and quality checks for labeling teams.

What are the key features?

  • Execute Workflow Trigger accepts any image URL as input
  • Embeds the image with Voyage AI multimodal embeddings for robust similarity
  • Queries Qdrant using the voyage vector space and fetches the closest class centers
  • Counts crop classes from Qdrant so the query always checks all labels
  • Supports medoid or text anchor medoid via simple variables you can switch
  • Compares top similarity score to stored class thresholds in a short code step
  • Returns a plain text result that states the best match or flags an anomaly
  • Centralizes Qdrant URL, collection name, and threshold types in Set nodes

What are the benefits?

  • Reduce manual review from hours to minutes by auto screening each image URL
  • Improve labeling accuracy by checking images against stored class thresholds
  • Handle thousands of images per day by using vector search instead of manual checks
  • Cut false matches with medoid based comparison and clear threshold rules
  • Scale to new crop types without new code by reading class count from Qdrant

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Qdrant and Voyage AI. See the Tools Required section above for links to create accounts with these services.
  3. Open the node named Total Points in Collection and make sure the QdrantApi credential is selected. If not, double click the node, choose the 'Credential to connect with' dropdown, click 'Create new credential', and follow the on screen steps to add your Qdrant Cloud URL and API key.
  4. Open the node named Get similarity of medoids and confirm it uses the same QdrantApi credential so both requests point to the same cluster and collection.
  5. Open the node named Embed image. In the 'Authentication' section, select HTTP Header Auth. Create a new credential and set the Authorization header to Bearer YOUR_VOYAGE_AI_API_KEY. You can create an API key in your Voyage AI account.
  6. Open the node Variables for medoids and set qdrantCloudURL and collectionName to match your Qdrant cluster and the target collection. Choose clusterCenterType and clusterThresholdCenterType to match how your centers and thresholds were saved.
  7. Decide how the image URL will be passed. For quick tests, edit Image URL hardcode and paste a public image URL. For production, call this workflow from a parent workflow using the Execute Workflow node and pass the URL as input.
  8. Click Execute on Total Points in Collection and Each Crop Counts, then check Info About Crop Labeled Clusters. Confirm cropsNumber matches the number of classes in your collection.
  9. Run the full workflow with a known crop image. You should see a message that names the likely crop. Test with an unrelated image and confirm it returns an anomaly message.
  10. Troubleshoot common issues: 401 or 403 errors mean the API key or headers are wrong. Empty or low scores often mean the collectionName is wrong or the embedding model in Qdrant does not match the voyage vectors. Fix variables and try again.
  11. When ready, call this tool from your main app or data pipeline using the Execute Workflow Trigger and pass the image URL to screen uploads in real time.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Qdrant

Sign up

Free tier: $0, 1 GB free cluster (no credit card), accessible via REST/GRPC API

Voyage AI

Sign up

Free tier via API: first 200M text tokens (embeddings) and 150B image pixels (multimodal). After free: as low as $0.02 per 1M tokens (voyage-3.5-lite); multimodal $0.12 per 1M tokens + $0.60 per 1B pixels (min $0.00003/image).

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.