Skip to content

Delete all files over 6 month old in your slack workspace.

Notifications You must be signed in to change notification settings

pip8786/slack-file-delete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What does this do?

This will delete all files on your slack workspace that you have access to that are over 6 months old. If you want to change how old the files are, just change monthsToSubtract constant. Note that because of rate limits on Slack's API, it can only delete about 60 files per minute, so 1200 files, for example, would take 20 minutes. Still faster than doing it yourself!

Prerequisites:

  • Yarn should be installed on your machine (or npm)

How to use:

  1. Clone this repository
  2. yarn install
  3. Create an app and add it to your slack: https://api.slack.com/apps?new_app=1
  4. Create a .env file in the root directory and grab the OAuth token from OAuth and Permissions.
    1. Put the token in the .env file like so: USER_TOKEN=<TOKEN_HERE>
  5. yarn dev

About

Delete all files over 6 month old in your slack workspace.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published