Enterprise-grade Slack workspace management tool for automatically archiving inactive channels across multiple workspaces in Slack Enterprise Grid.
π Enterprise Grid Support
- Multi-workspace management from a single tool
- Organization-level bot installation
- Workspace discovery and selection
π Smart Channel Analysis
- Multi-timeframe activity detection (30d, 60d, 90d)
- Flexible member threshold rules
- Detailed decision logic for each channel
π Safe Operations
- Dry-run mode by default
- Configurable exclusion patterns
- Conservative approach for inaccessible channels
π Rich Reporting
- Real-time console output with progress indicators
- Structured JSON logging for analysis
- Clear reasoning for each archiving decision
- Node.js 18+
- Slack Enterprise Grid organization
- Organization Admin permissions (for initial setup)
-
Clone and install:
git clone https://github.com/regardt-meyer/slack-channel-manager.git cd slack-channel-manager npm install -
Run guided setup:
npm run setup
This will guide you through creating and configuring your Slack app for Enterprise Grid.
-
Test the installation:
npm start
The setup wizard guides you through the entire process:
npm run setupChoose "Create new app" for first-time setup. You'll have two options:
- Fastest setup - Uses pre-configured app manifest
- Automatic permissions - All required scopes configured automatically
- One-click creation - Just review and create the app
- Step-by-step guidance - Detailed instructions for each step
- Learning experience - Understand how Enterprise Grid apps work
- Full control - Customize settings as needed
The wizard will:
- Open your browser to create a Slack app
- Provide step-by-step instructions for Enterprise Grid configuration
- Handle authentication and workspace discovery
- Save your configuration securely
For detailed manual setup instructions with screenshots, see: docs/setup-guide.md
If you prefer to create the app manually using the manifest, use slack-app-manifest.json:
- Go to api.slack.com/apps
- Click "Create New App" β "From an app manifest"
- Select your Enterprise Grid organization
- Paste the contents of
slack-app-manifest.json - Click "Create App"
# Dry-run analysis (safe, default mode)
npm start
# Execute archiving with custom rules
npm start -- --execute --max-members-inactive 5 --inactive-days 60
# Target specific workspace
npm start -- --workspace "workspace-name"
# View help
npm start -- --helpThe tool uses flexible, tiered archiving rules:
- Rule 1: Channels with β€0 members + inactive for X days
- Rule 2: Channels with β€N members + inactive for 60+ days
- Rule 3: Channels with β€N members + inactive for 90+ days
| Option | Default | Description |
|---|---|---|
--dry-run |
true |
Safe mode - shows what would be archived |
--execute |
false |
Actually perform archiving operations |
--inactive-days |
30 |
Primary inactivity threshold |
--min-members |
0 |
Immediate archiving threshold |
--max-members-inactive |
10 |
Max members for inactivity-based archiving |
--workspace |
all | Target specific workspace |
π Enterprise Channel Manager
Mode: DRY RUN
Archive Rules:
β’ Zero members + inactive 30+ days
β’ β€10 members + inactive 60+ days
β’ β€10 members + inactive 90+ days
π Processing workspace: Engineering
π Analyzing: old-project-alpha
π Members: 2
π Type: Public
β° Last message: 75 days ago
π Activity timeline:
β’ 30d: Inactive
β’ 60d: Inactive
β’ 90d: Active
π« Excluded: No
π Decision logic:
Rule 1: Members β€ 0 + Inactive 30d: β
Rule 2: Members β€ 10 + Inactive 60d: β
Rule 3: Members β€ 10 + Inactive 90d: β
β Archive: Rule 2 triggered
ποΈ WILL ARCHIVE - β€10 members and inactive 60+ days
npm run setup
# Choose "View current configuration"npm run setup
# Choose "Add/remove workspaces"npm run setup
# Choose "Reset all configuration"- π No secrets in code - All tokens stored locally in
.slack-config/ - π‘οΈ Gitignore protection - Sensitive files automatically excluded
- π Local storage only - Configuration never leaves your machine
- β Audit trail - All operations logged with structured data
slack-channel-manager/
βββ src/
β βββ index.js # Main application
β βββ setup.js # Setup wizard
β βββ auth.js # Slack authentication
β βββ config.js # Configuration management
βββ docs/
β βββ setup-guide.md # Detailed setup guide
β βββ screenshots/ # Setup process screenshots
βββ .slack-config/ # Local configuration (gitignored)
All operations are logged with structured JSON:
# View logs
tail -f slack-channel-manager.log
# Pretty print logs (if you have jq)
cat slack-channel-manager.log | jq '.'"No configuration found"
npm run setup # Run the setup wizard"Invalid client_id parameter"
- Ensure app is installed at organization level (not workspace level)
- Check redirect URL is set to
https://slack.com/oauth/callback
"not_in_channel" warnings
- Normal for private channels where bot isn't a member
- Tool uses conservative archiving rules for inaccessible channels
Bot can't access channel history
- Add bot to channels for better analysis, or
- Use
--join-channelsflag to attempt auto-joining public channels
DEBUG=true npm start- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Test thoroughly with
--dry-run - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- π Setup Guide with Screenshots
- πΊοΈ Roadmap
- π Report Issues
- π‘ Feature Requests