Slack Connect Channel Audit Tool

Slack Connect Channels are essentially channels that exist on two or more workspaces at once, accessible like a regular channel from any designated team's workspace. This is fantastic for collaboration. We found that many Connect Channels saw huge traffic shortly after creation, were heavily project-focused, and became stale (determined by a lack of activity for 30 days) fairly quickly. It's good practice to disconnect and archive shared channels that are no longer in use, so I built a tool that runs an audit, contacting the owners of stale channels with an message asking if they are still using the channel and letting them know they should select yes if so, or no if not, and then we will disconnect and archive the channel for them.

There were several challenges on this project, including that the data isn't that easy to access. You can export a list of shared channels with the channel details, including the creator and the timestamp of the last activity, if your permissions are high enough. My manager had to do this for me, as my permissions weren't high enough to access that section of the api. I ended up designing the tool to check a specific channel pinned .csv document and process that data. This does require that someone manually upload a CSV to the channel and keep it current, unfortunately.

The other option that I explored was accessing the conversations.info method to retrieve information about channels. This would return

If the user indicates that the channel is still needed, the chat updates with a thank you message that the channel will not be archived, and no further action is taken. If the user indicates that the channel is no longer needed, the chat updates with a thank you message that the channel will be archived soon. Then, the app posts in the tool's admin channel with information about the channel to archive, as well as instructions on how to disconnect and archive a channel, and another button to indicate that the task has been completed.

The project was placed on hold for the moment, as it will be integrated into a larger multi-tool with different utility options for non-technical Slack administrators; the next step is to automate the process of disconnecting and archiving. Ideally I would also automate the stale channel detection, perhaps running the process once per day, perhaps once per month, without needing to upload a CSV or interact with the app's home tab. (The high number of shared channels across the company would make continuous monitoring impractical.)

The app features:

  • Interactive messages
  • Updating messages
  • The ability to run the audit at any time from the app's home tab or a shortcut

And was built with:

  • Slack Bolt for Python
  • Python
© 2024 A Minor Studio