Automate Crop Image Embeddings & Batch Upload to Qdrant

This n8n workflow automates extracting crop images from Google Cloud Storage, generating embeddings with Voyage AI, and batch uploading them to Qdrant. It solves the challenge of efficiently preparing an agricultural crops dataset for anomaly detection and KNN classification with scalable batch processing.
httpRequest
set
filter
+2
Workflow Identifier: 2252
NODES in Use: manualTrigger, set, httpRequest, filter, code
Automate crop image embeddings with n8n and Voyage AI

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does ⚙️

This workflow gets images from Google Cloud Storage, turns them into vectors using an AI model, and uploads them to Qdrant. It solves the long, slow job of doing each image one by one. The result is a fast, easy-to-search vector database for crop analysis.

It checks if the Qdrant collection exists and makes one if missing. Then it loads image links, skips unwanted crops, splits images into batches, generates embeddings in groups, and uploads batches with IDs and metadata. This saves much time and cuts errors.


Tools and Services Used

  • Google Cloud Storage: Holds thousands of crop images.
  • Qdrant Cloud: Stores and searches vector data with similarity metrics.
  • Voyage AI Embedding API: Converts images to 1024-dimensional vectors.
  • n8n Automation Platform: Runs workflow to connect services and automate steps.

Inputs, Processing, and Outputs

Inputs

  • Google Cloud Storage bucket with crop images organized by crop types as folders.
  • API credentials for Voyage AI and Qdrant Cloud.
  • Configuration variables for collection name, batch size, and vector dimension.

Processing Steps

  • Checks Qdrant collection existence, creates if missing.
  • Fetches all crop images metadata from storage using a prefix filter.
  • Sets up public image URLs and extracts crop names from file paths.
  • Filters out specified crops (e.g., tomatoes) for anomaly testing.
  • Splits images into batches sized for efficient API calls.
  • Generates unique IDs (UUIDs) for each image point.
  • Formats batches for embedding API and Qdrant upload with metadata.
  • Calls Voyage AI API to create embeddings from image URLs.
  • Uploads each batch as vector points with metadata to Qdrant collection.

Output

  • A fully populated Qdrant vector collection with crop image embeddings and metadata.
  • Indexed data ready for similarity search and AI anomaly detection pipelines.

Who Should Use This Workflow

Anyone with large image datasets in Google Cloud Storage who wants to build AI models on images quickly. Especially useful if searching images by content or detecting crop anomalies matters.

Users with Qdrant Cloud accounts and access to Voyage AI embedding API can automate big image uploads without manual work.


Beginner Step-by-Step: How to Use This Workflow in n8n

Importing the Workflow

  1. Download the workflow JSON file using the Download button on this page.
  2. In the n8n editor, click on menu and select “Import from File”.
  3. Choose the downloaded workflow JSON and import it.

Configuring Credentials and Variables

  1. Add Google Cloud Storage credentials to n8n credential manager.
  2. Add Qdrant Cloud API credentials (URL and authorization headers) in n8n.
  3. Add Voyage AI API key in the HTTP Request node headers for embedding.
  4. Open the Qdrant cluster variables node and update these values as needed:
    – Qdrant Cloud URL
    – Collection name
    – Embedding dimension (usually 1024)
    – Batch size (suggest 4 or fewer if new)

Running and Activating

  1. Run the workflow once in test mode to check for errors.
  2. Look at execution logs to ensure images are batched, embedded, and uploaded correctly.
  3. Fix any credential or configuration errors that appear.
  4. Activate the workflow in n8n for ongoing or scheduled execution.
  5. Optionally, host your n8n instance using self-host n8n for control and security.

Customization Ideas

  • Change batch size in Qdrant cluster variables to balance API speed and rate limits.
  • Use a different dataset by editing Google Cloud Storage prefix filter in the Google Cloud Storage node.
  • Switch distance metric in Qdrant collection creation node from Cosine to Euclidean if needed.
  • Add filters to skip other crop types besides tomatoes, using filter nodes.
  • Change embedding model name in the Voyage AI API JSON payload to use a different model.

Common Issues and Troubleshooting

Collection Already Exists Error

This happens if the workflow tries to create a Qdrant collection that is already there.

Make sure the node Check Qdrant Collection Existence correctly skips the creation step when the collection exists.

API 401 Unauthorized Errors

These errors mean API keys for Voyage or Qdrant are wrong or missing.

Double-check credentials in n8n credential manager and test the HTTP nodes separately to confirm access.

Wrong Crop Name Extraction

If crop names look wrong, probably the path parsing is off.

Edit the expressions in the Get fields for Qdrant node so the slice occurs on correct parts of the file paths.


Pre-Production Checklist ✅

  • Check the Google Cloud Storage bucket and prefix path are correct and accessible with current credentials.
  • Test the existing Qdrant collection API call, and collection creation logic.
  • Ensure Voyage AI API key is valid and has allowed enough requests for batch processing size.
  • Run the workflow with a small batch count (like 2) to catch errors before full runs.
  • Backup existing Qdrant collections if overwriting data.

Summary of Benefits

✓ Saves time by automating image batch embedding and uploading.
✓ Avoids manual errors by linking cloud storage directly to vector search.
✓ Produces searchable Qdrant collections ready for AI anomaly detection.
✓ Users get batch processing with unique IDs and metadata tagging.
→ The workflow turns thousands of images into vectors fast and manages data flow.
→ It allows easy scaling and rerunning with minimal tweaking needed.

Automate crop image embeddings with n8n and Voyage AI

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The workflow uses a HTTP GET request to the Qdrant collections exists API endpoint with the collection name and URL.
Verify the API key for Voyage AI is correctly entered in the HTTP request headers and check for any issues in the n8n credentials manager.
Use the filter node set to exclude crop names, such as tomatoes, by checking the cropName field after extraction.
Batching groups images into sets for embedding API calls and uploads to improve speed and reduce errors from large requests.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.