🎯 Automated Slack channel inactivity audit & report generator for workspace cleanup

⚑ 108 views · 🎯 AI Summarization & Classification

Description

Automated Slack Channel Audit Workflow with Chatbot and GPT-4.1

> Automatically scans all public Slack channels weekly to detect those with no activity in the past 30 days, then generates and sends a detailed inactivity report to admins for review and action. Helps keep your Slack workspace clean, relevant, and clutter-free.

πŸ§‘β€πŸ’Ό Who’s it for

This workflow is built for:

βš™οΈ How it works / What it does

This automated n8n workflow:

  1. Runs weekly via a scheduled trigger.
  2. Fetches all public Slack channels in the workspace.
  3. Checks message history of each channel for activity.
  4. Filters channels that have had no discussion in the past 30 days.
  5. Generates a Slack-friendly report with key metadata (name, member count, purpose, etc.).
  6. Sends the report to a Slack channel for admin review and possible action (e.g., archive, engage, repurpose).

πŸ› οΈ How to set up

  1. Configure your Slack App

    • Go to https://api.slack.com/apps β†’ Create App
    • Add the following OAuth scopes to your Bot Token:
      • channels:read β†’ to get list of public channels
      • channels:history β†’ to fetch message history
      • users:read β†’ to personalize report (optional)
      • chat:write β†’ to post the report to a Slack channel
  2. Install the app in your workspace

    • Copy the Bot User OAuth Token
    • Add it to your n8n Slack credentials under β€œSlack API”
  3. Customize the schedule in the β€œWeekly Schedule Trigger” node to control report frequency.

  4. Connect your Slack workspace to the workflow using your credentials.

βœ… Requirements

πŸ”§ How to customize the workflow

ComponentCustomization Options
⏱️ Schedule TriggerChange to daily, monthly, etc.
πŸ“… Inactivity ThresholdModify Filter channel with last discussion 30 days ago to 60/90 days
πŸ“Š Report FormattingTweak the Consume slack report node to change formatting or summary
πŸ’¬ Output ChannelChange target channel in Send Channel Inactivity Report
🚫 Auto-archivingAdd logic to archive channels with 0 members or activity (using Slack API)

πŸ“ Slack Permissions Reference

ActionSlack Scope Required
Get all public channelschannels:read
Get message history of a channelchannels:history
Post message to Slackchat:write
Get user info (optional)users:read

πŸ”— Nodes Used

Slack, Schedule Trigger, Filter

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup