Image Object Detection & Search Automation with n8n & Cloudflare AI

This workflow automates image object detection using Cloudflare’s AI, crops detected objects, and indexes them in Elasticsearch. It streamlines detailed image search by object association, saving hours of manual work in image processing and cataloging.
manualTrigger
httpRequest
splitOut
+5
Workflow Identifier: 1694
NODES in Use: manualTrigger, httpRequest, splitOut, filter, editImage, set, elasticsearch, stickyNote
Automate image object detection with n8n and Cloudflare AI

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

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow takes one image from a web link and finds objects inside it using a Cloudflare AI model.
It picks only objects with high confidence, cuts each object out from the image, and uploads these pieces to Cloudinary.
Then, it saves details about these objects and their image links into an Elasticsearch database for easy searching.
The main problem solved is stopping the long, hard work of sorting and tagging images by hand.
You get many smaller images each showing one object and a database ready for searching.


Inputs, Process, and Outputs

Inputs

  • Source Image URL: The web address of the main image to check.
  • Cloudflare Account ID and Model Name: Required for calling the AI object detection.
  • Cloudinary Credentials and Preset: Needed to upload cropped images.
  • Elasticsearch Index: The database where metadata will be stored.

Processing Steps

  • Download the image using the URL provided.
  • Send the image to Cloudflare’s Detr-Resnet-50 AI model to find objects with bounding boxes.
  • Split the list of detected objects into single items.
  • Filter to keep only objects with confidence 0.9 or higher.
  • Download the source image again for cropping (since splitting loses binary).
  • Crop each object area from the image using box coordinates.
  • Upload cropped images to Cloudinary, getting back their URLs.
  • Index the metadata, object labels, and image URLs into Elasticsearch.

Outputs

  • Individual cropped images for each detected object hosted on Cloudinary.
  • Elasticsearch documents containing searchable metadata linking cropped images to object labels and source image.


Tools and Services Used

  • n8n Automation Platform: Runs and manages the workflow.
  • Cloudflare Workers AI (Detr-Resnet-50 Model): Detects objects inside images.
  • Cloudinary: Hosts cropped images with fast URLs.
  • Elasticsearch: Stores indexes of object metadata and image URLs for search.


How to Use This Workflow in Production (Beginner Steps)

Step 1: Download and Import

  1. Download the workflow file using the Download button on this page.
  2. Open your n8n editor.
  3. Use the import feature “Import from File” to bring the workflow into n8n.

Step 2: Add Credentials and Update IDs

  1. Go to each node requiring authentication, like Cloudflare and Cloudinary HTTP Request nodes, and add correct API Keys.
  2. In the Set Variables node, update Cloudflare Account ID, Elasticsearch index name, and source image URL as needed.
  3. If the workflow uses any email, Slack, folder, or table references, update those with your own IDs.

Step 3: Test the Workflow

  1. Find the manualTrigger node and click Execute Workflow to start.
  2. Confirm the workflow runs without errors.
  3. Check Cloudinary for the cropped images and Elasticsearch for new documents.

Step 4: Activate the Workflow for Production

  1. Replace the manualTrigger node with an automatic trigger like a Webhook node or Schedule node if desired.
  2. Enable the workflow to run whenever new images need processing.
  3. Monitor workflow runs regularly and check logs for any failures.
  4. For better control with self hosting n8n, consider resources like self-host n8n.


Edge Cases and Common Issues

  • Wrong Cloudflare credentials cause API authorization errors.
  • If the source image URL is broken or private, the workflow fails at the download step.
  • A too high confidence filter may block many detected objects.
  • Incorrect bounding box calculations can crop unwanted parts.
  • Cloudinary upload fails if presets or keys are invalid.
  • Elasticsearch indexing fails if index names are wrong or mapping is missing.


Customization Ideas

  • Use a Webhook node to start the workflow when new images are uploaded instead of manual trigger.
  • Change the confidence filter threshold to include more or fewer objects.
  • Adjust Cloudinary upload presets for different image processing rules.
  • Add more metadata fields in Elasticsearch for better searching.
  • Send summary notifications after processing with Slack or email nodes.


Summary

→ Saves hours of manual image sorting and tagging.
→ Produces cropped images of detected objects hosted online.
→ Creates a searchable Elasticsearch index linking objects and images.
→ Uses easy-to-configure n8n workflow with cloud AI and services.
→ Can be customized to fit different image sources and alert needs.


Automate image object detection with n8n and Cloudflare AI

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

401 errors occur when Cloudflare Account ID or API Key credentials are missing or incorrect in the workflow settings.
Upload failures happen when the Cloudinary upload preset is invalid or API credentials are wrong.
If the confidence filter is too high, fewer objects are kept for cropping and indexing; lowering it includes more detections.
Users must add API credentials, update variables like account IDs and URLs, test the workflow manually, then activate it with an automatic trigger.

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.