Inspiration

As Confluence spaces grow, pages accumulate attachments that are no longer needed - outdated images, unused files, and remnants of old templates. These increase storage costs, slow down spaces, and make content harder to maintain.

Deleting attachments is risky. It’s often unclear whether a file is still referenced (in the page body, as a header or cover image), reused elsewhere, or protected by conventions or labels. Teams avoid cleanup because a single wrong deletion can silently break content.

We wanted a safe, explainable, and on-platform way to help teams understand which attachments are truly unused - and why.


What it does

Attachments Cleanup Assistant helps Confluence teams identify and safely clean up unused attachments.

  • Scans Confluence pages to detect:
    • attachments referenced in the page body (including filename-based hints)
    • header and cover image usage
    • attachments protected by labels or defined rules
  • Classifies attachments as:
    • Used
    • Unused
    • Protected / requires review
  • Uses Rovo agent actions to explain why an attachment is considered safe, risky, or protected
  • Lets users talk to their data:
    • “Why is this attachment unsafe to delete?”
    • “What would break if I remove this file?”
  • Provides safe cleanup flows:
    • single-attachment deletion with explicit confirmation
    • bulk cleanup suggestions that are never destructive by default
  • Fully permission-aware:
    • runs with the initiating user’s permissions
    • never exposes content the user cannot access

How we built it

Platform

  • Atlassian Forge app for Confluence Cloud
  • Custom UI (React) with Forge Bridge and Atlassian design primitives
  • Native Rovo agent with action modules for analysis and explanation

Backend

  • Page and attachment scanning via Confluence REST APIs
  • Deterministic usage detection based on multiple signals:
    • in-body references
    • header and cover image usage
    • high-confidence filename and metadata hints
  • Label-based protection rules and conservative risk heuristics
  • Permission-aware execution using user-scoped access
  • Structured logging and storage-backed configuration

Frontend

  • Clear visual indicators for attachment status:
    • Used - ✅
    • Protected - 🔒
    • Unused - ❌
  • Review-first UX:
    • visible evidence and “why” explanations
    • explicit confirmations before any destructive action
  • Resilient UI for large spaces and partial data, with accessible components

Challenges we ran into

  • Hidden usage detection
    Cross-page references are difficult to detect reliably. We prioritized high-signal checks and designed the system to be conservative, encouraging review over automation.
  • Safety over automation
    Full auto-delete is dangerous. The system is designed to explain first and act only with explicit user intent.
  • Permissions and trust
    Actions must respect user visibility. We carefully distinguish re-authentication issues from genuine access restrictions to avoid misleading users.
  • Scale
    Large spaces can contain thousands of attachments. We optimized scans, limited payload sizes, and kept the UI responsive.

Accomplishments that we’re proud of

  • A cleanup tool that users can genuinely trust
  • Clear, explainable decisions instead of “black box” AI
  • Safe defaults that prevent accidental content breakage
  • Intuitive, accessible UI with consistent iconography
  • Seamless integration into existing Confluence workflows

What we learned

  • Fear of breaking content is the biggest blocker to cleanup
  • Explainability matters more than automation
  • Combining multiple weaker signals is safer than relying on a single assumption
  • Small UX details (icons, summaries, wording) significantly improve adoption

What’s next for Attachments Cleanup Assistant

  • Space-wide reference detection for deeper reuse insights
  • Smarter protection rules for templates and shared assets
  • Admin-focused audit logs and cleanup history
  • Optional scheduled cleanup suggestions (never automatic deletion)
  • Deeper Rovo integrations for guided cleanup and impact analysis across spaces

Built With

Share this project:

Updates