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
- Download the workflow file using the Download button on this page.
- Open your n8n editor.
- Use the import feature “Import from File” to bring the workflow into n8n.
Step 2: Add Credentials and Update IDs
- Go to each node requiring authentication, like Cloudflare and Cloudinary HTTP Request nodes, and add correct API Keys.
- In the Set Variables node, update Cloudflare Account ID, Elasticsearch index name, and source image URL as needed.
- If the workflow uses any email, Slack, folder, or table references, update those with your own IDs.
Step 3: Test the Workflow
- Find the manualTrigger node and click Execute Workflow to start.
- Confirm the workflow runs without errors.
- Check Cloudinary for the cropped images and Elasticsearch for new documents.
Step 4: Activate the Workflow for Production
- Replace the manualTrigger node with an automatic trigger like a Webhook node or Schedule node if desired.
- Enable the workflow to run whenever new images need processing.
- Monitor workflow runs regularly and check logs for any failures.
- 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.

