Get Slack conversation data as json files and download files in your workspace with Python and Slack API.
To use this code, you must prepare your Slack API token which is installed to your workspace.
The token needs these OAuth Scopes:
- channels:history
- channels:read
- emoji:read
- files:read
- groups:history
- im:history
- mpim:history
Write config.yaml
referring to sampleConfig.yaml
.
config.yaml
needs three informations: workspace
, saveDir
and TOKEN
.
// config.yaml
config:
workspace: YourWorkspace
saveDir: save
TOKEN: Your Slack API token
-
Make
config.yaml
. -
If
pyyaml
isn't in your environment, install withpip install pyyaml
. -
Run
python main.py
in terminal.