Slacker: archiving information from a Slack workspace

Slack is a wonderful tool for communicating and organising work in teams. Many academic groups are using the free version (since the pricing is simply incompatible with how we are funded). Slack has had a 10,000 message limit for free tier workspaces for many years but they recently changed it to a 90 day limit. This means any messages older than 90 days will no longer be visible.

The way we use our lab slack workspace is mainly for rapid communication. What’s there doesn’t really need to be archived, but there are occasional posts in the public channels which are useful. How can we archive this important information?

Unsurprisingly there are many solutions to this problem. I will describe one approach that worked for us. Feel free to comment if you know something better.

I have been exporting our slack workspace data at approximately 90 day intervals for some time, so I have several zipped archives of our data. If you don’t have this, and the 90 day limit has not kicked in or you find yourself gifted with a free trial of pro (giving you access to everything), download your data immediately. Failing this, my advice would be to just download your last 90 days and start archiving!

The archive is a bunch of json files. You will have folders for each channel (it is not possible for you to download DMs) in each will be many json files (one for each day that there was activity). These files are not really human readable. So to view the data I used slack-export-viewer available here.

Getting going

I used pipx for install as suggested. I had to install pipx on my machine via homebrew

I am running macOS 12.5 and I found that the launch of localhost:5000 in my browser did not work at first. I had to edit my /etc/hosts file which is possible using sudo nano /private/etc/hosts simply adding       localhost

to the file and saving. For those that don’t know, sudo will require an admin password and nano can be saved and closed using ctrl+x and saying yes.

All good, now to view the slack data.

If you have multiple zipped archives, they can each be extracted and, using rsync, combined into one single folder. Maybe you just want to have a look at one archive first though. slack-export-viewer will open a zip archive directly or it will take an extracted archive.

slack-export-viewer -z path/to/archive

And amazingly your slack archive pops up in your browser!

The formatting is pretty good and it’s certainly good enough to scroll around and copy out any useful information. I went through our microscopy channel and picked out the posts that folks had made that we wanted to archive and copied them direct to a post on our ELN. I’m sure it’s possible to serve this archive up as a “website” but the majority of the info in there is not really useful for us to put in the effort for this.

The best bit is that all the attachments are available and can be downloaded direct from slack with no restriction. In the screenshot above you can see two pictures, they can be clicked on and downloaded at full resolution. PDFs could be pulled down too.

Final word

This tip worked for our use case and it might work for you too. Just to reiterate that there are lots of slack tools out there and I didn’t do much investigating since I had the archives and just wanted to extract some info.

The post title comes from “Slacker” by Wall of Sleep off their eponymous album.