Skip to content

This script automatically deletes your team's Slack files to free up space.

License

Notifications You must be signed in to change notification settings

Instagit/slack-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Slack Cleanup

Since Slack's file management is somewhat lacking, you can use this script to delete all your team's files automatically and save the time you spend repeatedly asking team members to delete their files manually so you don't hit the storage limit.

It requires a certain amount of trust, as the legacy tokens can be used for anything in Slack.

Steps:

  1. Have each team member create a token (https://api.slack.com/custom-integrations/legacy-tokens).
  2. Add names and tokens to $token_list[] (line 7).
  3. Specify the time files should be kept for with $timestamp (line 6). Default is one month.
  4. Run the script.
  5. [optional] Add script to crontab to run it regularly.

The script is based on https://gist.github.com/kasperhartwich/dec5923ffcba55686dfb.

Slack legacy tokens:

You're reading this because you're looking for info on legacy custom integrations - an outdated way for teams to integrate with Slack. These integrations lack newer features and they will be deprecated and possibly removed in the future. We do not recommend their use.

¯\_(ツ)_/¯

About

This script automatically deletes your team's Slack files to free up space.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages