Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save d3vAdv3ntur3s/3b51de78880fb31990e19a079df0999c to your computer and use it in GitHub Desktop.
Save d3vAdv3ntur3s/3b51de78880fb31990e19a079df0999c to your computer and use it in GitHub Desktop.
Instructions for how to backup and view Slack workspace chat history
Login to slack workspace -> https://api.slack.com/custom-integrations/legacy-tokens -> select generate token
* Dependencies required:
** `pip install slacker` # https://github.com/os/slacker
** `pip install pick` # https://github.com/wong2/pick
** Download Slack export tool: `https://github.com/zach-snell/slack-export/archive/master.zip`
** `pip install slack-export-viewer` # https://github.com/hfaran/slack-export-viewer
* Run instructions:
** `python slack_export.py --token xoxp-2474487112... --directMessages --publicChannels myTeam inccidents` # creates timestamped folder e.g. <yyyymmdd>-<hhmmss>-slack_export
** `zip -r ../<yyyymmdd>-<hhmmss>-slack_export.zip *` # Requires to be in archive, output folder needs to be zipped
** `slack-export-viewer -z <yyyymmdd>-<hhmmss>-slack_export.zip` # loads browser localhost:5000 with Slack like UI with data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment