Watch changes to Slack Users.
Attempt to display data in an interesting manner.
-
track.py- pull all users, separate between bots and humans, and git commit in order to make tracking changes easier -
attrition.py- Plot departures per week based on deleted human users
Run once a day at midnight
0 0 * * * /home/USER/dev/slack/track/run.shRequires setting secrets with
SLACK_TOKEN="YOUR-SLACK-TOKEN"
Use pyenv and python 3.11.0 for convenience.
pyenv virtualenv 3.11.0 slacktrack
pip install slack_sdk
pip install GitPython
pip install pandas
pip install matplotlib
pip install PyQt5"users:read" permission scope is required
Can potentially use
'updated': 1633752686,To determine date of departure for people
'deleted': True,export SLACK_TOKEN=""
python track.pyThe token must have "users:read" permission scope