saitota / SlackFileCleaner

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ—‘οΈ Slack File Cleaner

It is a serverless function that periodically delete old attatchment files.

Description

Using Slack's LEGACY TOKEN to check old files, and delete them all. LEGACY TOKEN needs to be create manually, but AWS side automates environment construction by using Serverless Framework.

Requirement

Installation

  1. Create LEGACY TOKEN from Here

  2. Clone this repo.

$ git clone https://github.com/saitota/SlackFileCleaner.git
  1. Modify environment_dev.yml 's two TOKEN to your token.
LEGACY_TOKEN: 'xoxp-000000000000-000000000000-000000000000-0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x0x'
  1. Deploy with Serverless Framework (you must aws-cli initialize before)
$ sls deploy ./SlackFileCleaner
...
api keys:
  None
endpoints:
  None
functions:
  fnc: SlackFileCleaner-dev-fnc
  1. Done! Wait a time to archive. (12:30 JST is the default)

πŸ€” Anything Else

I will write article about this function.

saitotak - Qiita

πŸ‘ Author

saitotak

✍ License

MIT

About

License:MIT License


Languages

Language:Python 100.0%