Weekly cleanup digest for duplicate Cloudinary images

By General Input

Every Monday morning, an AI teammate scans your Cloudinary library for duplicate and near-duplicate images and posts a review-ready cleanup list to Slack.

Integrations

  • Cloudinary
  • Slack Bot

Type

Agentic Task

Categories

  • Marketing
  • Operations

Every Monday at 9am, run a duplicate-image cleanup pass on our Cloudinary environment and post a review-ready report to Slack. Nothing is ever deleted by the workflow; humans confirm the cleanup afterwards.

Step 1. Use Cloudinary Search Assets to pull every image uploaded in the last 30 days (resource_type = image, filter by created_at within the last 30 days), sorted by created_at descending. Cap the working set at around 200 images so we stay well inside the hourly Admin API budget.

Step 2. Pick a representative sample of that working set (roughly 25 to 50 images, spread across folders so we do not over-index on one campaign). For each sampled image, call Cloudinary Visual Search using the asset URL or public ID to surface visually similar assets already in the environment. Merge results into clusters, where a cluster is one seed asset plus every visually similar asset returned above a reasonable similarity threshold. Deduplicate clusters that share members so we do not report the same group twice.

Step 3. For every asset inside every remaining cluster, call Cloudinary Get Resource by Public ID to fetch created_at, bytes, width, height, format, folder, and secure_url. Drop clusters where only a single asset survives dedup.

Step 4. For each cluster, draft a recommendation. Pick the canonical version by preferring the highest resolution first, then the largest file size, then the earliest created_at, unless the asset lives in a scratch, staging, or work-in-progress style folder (in which case demote it). Mark every other asset in the cluster as a candidate delete with a short reason such as lower resolution, older upload, sits in a scratch folder, or near-identical crop. Include a one-sentence human summary of why the assets in the cluster look alike.

Step 5. Post the report to Slack using Slack Bot Send a Message to the channel the user chose during setup. Structure the message with one section per cluster: a header, the recommended canonical asset with its thumbnail link, then the candidate deletes each with their thumbnail link and reason, and finish every cluster with a clearly labelled 'awaiting human approval' line so nobody assumes the cleanup already ran. If the week produced no clusters at all, post a short 'no duplicates found this week' message instead of staying silent.

Do not call any Cloudinary delete, destroy, or bulk-remove operation under any circumstances. This workflow is recommend-only. A human reviews the Slack digest and performs any actual deletions inside the Cloudinary console.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them