Engineering Manual & Technical RunbookProduction Spec v1.0

Documentation & API Reference

Everything needed to install, operate, and govern Bulk Message Remover. Architecture lifecycle, complete syntax catalog, limits, and security scopes.

01 // ARCHITECTURE•Stateless Lifecycle

How Bulk Message Remover Works

Bulk Message Remover is an open-source, stateless Slack automation application. It operates without database message storage, maintaining strict zero-retention compliance while enabling individual workspace members to prune stale conversations, uploaded attachments, and credentials.

Zero Content Storage

Messages streamed only in volatile RAM during filter comparison.

Per-User Isolation

User tokens scoped strictly to authenticating user id.

Preview First

Permanent destruction requires explicit keyword confirmation.

Execution Engine & Memory Lifecycle

Stateless volatile stream specification

Verified Zero Storage
Transit ProtocolSlack Web API encrypted streams
TLS 1.3ENCRYPTED
RAM RetentionGarbage collected immediately post-scan
0.00sTRANSIENT
OAuth Token VaultStored at rest with unique per-user IV
AES-256-GCMISOLATED
Execution QuotaCompliant with Slack Tier 3 rate pacing
~50 msg / minREGULATED
Verified zero content caching across all worker lifecycle stagesSCHEMATIC SPEC

Workspace App Manifest Schema (JSON)

Workspace administrators install this manifest into their Slack API App Console to register the /clean command.

SLACK MANIFEST SCHEMA (JSON)
{
  "display_information": {
    "name": "Bulk Message Remover",
    "description": "Purge your own messages and attachments in bulk."
  },
  "features": {
    "slash_commands": [
      {
        "command": "/clean",
        "description": "Interactive Slack bulk message scrubber",
        "should_escape": false
      }
    ]
  },
  "oauth_config": {
    "scopes": {
      "user": [
        "channels:history",
        "groups:history",
        "im:history",
        "mpim:history",
        "chat:write"
      ],
      "bot": [
        "commands"
      ]
    }
  }
}
02 // SYNTAX•Complete Command Reference

Command Reference & Syntax Catalog

Every operation is triggered via the universal /clean slash command. Filter parameters can be concatenated in any arbitrary order.

Current Channel Dry-Run (Default Safe Mode)

safepreviewhere

Scans the current channel for your messages older than 30 days. No messages deleted.

/clean here older:30d

Workspace-Wide Stale Media Quota Purge

quotamediaalldelete

Purges uploaded photos and GIFs older than 90 days across every room to free quota.

/clean all older:90d only:pics delete

Emergency Credential Scrub

emergencysecuritykeyworddelete

Instantly scrubs an accidental API key or confidential secret disclosed in the past hour.

/clean here newer:1h keyword:sk_live delete

Complete Direct Message Stale History Scrub

dmretentiondelete

Removes all 1-year+ old direct messages across all your 1:1 and group DMs.

/clean dm older:365d delete

Stale PDF and Document Cleanup

filesheredelete

Cleans out all old PDF, ZIP, and binary file attachments in the current conversation.

/clean here older:60d only:files delete

Global Preview for Specific Search Term

previewallkeyword

Performs a harmless dry-run across all accessible conversations for the term "deprecated".

/clean all keyword:deprecated
Scope ModifierTarget Room ScopeOperational Rule
hereActive Channel OnlyDefault safe scope. Only scans the current channel or DM.
allEvery Joined RoomIterates through all public/private rooms and DMs you participate in.
dmDirect Messages OnlyRestricts scanning strictly to 1-on-1 and group Direct Message threads.
#channelExplicit Target RoomCleans target channel without switching your current active room.
03 // RUNBOOK•Error Matrix

Troubleshooting Matrix & Error Runbook

Diagnostic resolutions for common OAuth session timeouts, rate limits, and permission constraints.

Token expired or revoked (invalid_auth)
Root Cause

Your OAuth authorization session expired or was revoked in Slack.

Resolution

Execute /clean login in any channel to complete a fresh 1-click authorization handshake.

0 messages matched during preview scan
Root Cause

Filter expressions (e.g. older:90d) matched no messages authored by your user ID.

Resolution

Broaden your parameters (e.g. try older:7d), remove keyword constraints, or confirm your channel scope.

Rate limited • deletion paused
Root Cause

Slack temporarily flagged high API traffic from your workspace token.

Resolution

The background worker detects Retry-After headers automatically, pauses safely, and resumes without message loss.

App not responding in private channel
Root Cause

The bot integration has not been invited into the private room.

Resolution

Type /invite @Bulk Message Remover into the private channel, or use /clean here.

04 // GOVERNANCE•Tier 3 Rate Pacing

API Limits & Adaptive Throttling

Slack enforces a Tier 3 rate limit on the chat.delete endpoint (~50 deletions per minute per user). Our worker implements an adaptive token-bucket throttler that guarantees zero 429 rate limit suspensions:

Pacing Ceiling1 msg / sec

Strict adherence to Slack Tier 3 rate limits

1,000 Messages~20 minutes

Autonomously processed in background

Offline Autonomous100% Async

Safe to close Slack and shut down computer

05 // SCOPES•OAuth Security Boundaries

Slack OAuth Permissions Explained

Every permission scope requested by Bulk Message Remover is strictly scoped to your authenticating user account. The app can never view or delete communications written by your colleagues.

OAuth ScopeToken TypeTechnical PurposeAccess Boundary
channels:historyUser TokenRead public channel history to match your message filtersPublic conversations you have joined
groups:historyUser TokenRead private channel history to evaluate filter criteriaPrivate channels where you are an active member
im:historyUser TokenIdentify past messages sent by you in 1-on-1 Direct MessagesPersonal Direct Message conversations
mpim:historyUser TokenIdentify past messages sent by you in Group Direct MessagesGroup Direct Messages you are included in
chat:writeUser TokenExecute chat.delete to permanently purge matched messagesYour authored messages only (never messages of colleagues)
commandsBot TokenRegister and handle /clean slash commands within SlackWorkspace slash command dispatcher
WHAT IT CAN DELETE
  • Messages authored by your authenticating user ID
  • Files, images, code snippets, and PDFs uploaded by you
  • Thread replies authored by you in any channel you belong to
  • Messages in private rooms and DMs where you are a member
WHAT IT CANNOT DELETE
  • Messages sent by any other colleague or team member
  • Bot messages, third-party webhooks, and automation feeds
  • Channels or Direct Messages you have not joined
  • System notices (user join/leave notices, canvas records)