n8n

How to Automate Cloudflare Image Search Indexing?

Build object based image search without manual tagging. The flow finds objects in a photo, crops them into new images, uploads them to a media host, and indexes them for fast lookup. Ideal for ecommerce and media teams that manage large photo libraries.

The run begins with a manual test. A Set node holds the account id, model name, source image link, and the Elasticsearch index. The image is downloaded and sent to a Cloudflare Workers AI vision model for object detection. Results are split so each object is handled on its own. A filter keeps only high confidence items with a score of 0.9 or higher. The source image is downloaded again, then each object is cropped using the exact box coordinates. Each crop gets a clean file name that includes the original name, the label, and the item index. Cropped images are uploaded to Cloudinary, and the returned secure link and metadata are saved as new documents in Elasticsearch.

You need accounts for Cloudflare Workers AI, Cloudinary, and Elasticsearch. Store credentials in n8n and set the variables before testing. Expect big time savings on tagging and faster search across assets. Great for product catalogs, stock photo teams, and any group that wants object level search without manual work.

What are the key features?

  • Manual test trigger to run and validate the pipeline safely.
  • Central Set node to store account id, model name, source image URL and index name.
  • HTTP Request downloads the source image as binary data for analysis.
  • Cloudflare Workers AI runs object detection and returns labels, scores and boxes.
  • Split Out turns the result list into one item per object for easy looping.
  • Filter keeps only objects with a score of 0.9 or higher to reduce noise.
  • Edit Image crops each object using bounding box math and creates clean file names.
  • Cloudinary upload returns a secure URL, then Elasticsearch stores the URL and metadata for search.

What are the benefits?

  • Reduce manual tagging from 2 hours to 10 minutes per 100 images
  • Automate up to 90 percent of repetitive image labeling
  • Improve search accuracy by keeping only high confidence results
  • Handle thousands of objects per day without adding staff
  • Connect Cloudflare Workers AI, Cloudinary and Elasticsearch in one flow
  • Speed time to publish new assets by 60 percent

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 Cloudflare Workers AI, Cloudinary and Elasticsearch. See the Tools Required section above for links to create accounts with these services.
  3. Open the Set Variables node and fill in your Cloudflare account id, the model name, the source image URL and your Elasticsearch index name.
  4. In the Cloudflare Object Classification node, double click the node, then on the 'Credential to connect with' dropdown, click 'Create new credential' and follow the on screen instructions to integrate that service. Use an API token with permission to call Workers AI.
  5. Check the first HTTP Request node that downloads the image. Make sure it outputs binary data in the property named data so the AI node can read it.
  6. Run a quick test by clicking Test Workflow. Confirm the AI node returns a result array with labels, scores and boxes.
  7. Adjust the Filter node threshold if needed. Lower it to catch more objects or raise it to keep only very confident results.
  8. Open the Upload to Cloudinary node. Double click the node and create a new HTTP Query Auth credential. Add your Cloudinary API details and confirm the upload_preset exists in your Cloudinary dashboard.
  9. Test the Cloudinary step. You should see a secure_url in the output. If you get errors, check your preset name and cloud name.
  10. Open the Elasticsearch node. Double click the node and create a new Elasticsearch credential. Enter your host, username and password or API key. Make sure the index in the Set node matches an index that exists or that your cluster allows auto create.
  11. Run the full workflow. Check Cloudinary for the new cropped images and confirm new documents appear in your Elasticsearch index with the image_url, label and score fields.
  12. If you see 401 errors, check credentials. If uploads fail, verify the preset and file size limits. If indexing fails, confirm index permissions and field names.

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.

Cloudflare Workers AI

Sign up

Free tier: 10,000 Neurons/day included; overage (Workers Paid): $0.011 per 1,000 Neurons

Cloudinary

Sign up

Free plan: $0 / mo, includes API access (Upload widget, API, search) with 25 monthly credits

Elasticsearch

Sign up

Self-managed Basic: Free ($0)

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.