Chat logs on an unpaid Slack
December 27, 2018 9:46 AM   Subscribe

I'd like to (consensually and benevolently) keep logs of a private Slack channel, on an unpaid Slack, where I'm not an admin. I understand I'm not supposed to, but, uh, how can I?

Things I already know:
  1. Keeping chat logs is socially and ethically complicated. I get it. Please assume I'm doing it in good faith, with the consent of all involved, for tediously benevolent reasons.
  2. Slack's business model means they don't want anyone to keep logs on an unpaid slack. I get it. I know we could have a really fun conversation about when precisely small ToS violations are ethical, and whether I've met those criteria, but that's not what I'm asking.
  3. This would be easier if I got a paid plan. Oh boy do I get it. This is on a social Slack with thousands of members, making a paid plan impossible; and previous attempts to migrate the channel off this Slack have failed. Please assume I've tried my best and it's not going to happen.
With that said: We all would like to keep logs of this channel. I am okay with running a script periodically by hand (or by cron job). But it would be cool if it was a script someone else had written and debugged, and not a buggy piece of shit I had to throw together myself. What is out there for this? Google isn't giving me much help — most results are about upgrading to paid, or about the basics of doing various simple things with the Slack API.
posted by nebulawindphone to Computers & Internet (3 answers total) 4 users marked this as a favorite
 
Searching for "slack archive bot" turned up a few relevant results, such as this: https://github.com/docmarionum1/slack-archive-bot
posted by shanek at 10:15 AM on December 27, 2018 [1 favorite]


Also, this pile of python on github claims to archive past slack history.
posted by pharm at 11:47 AM on December 27, 2018


This slack history python script has worked well for me. I run it every two weeks or so, and it exports as json. I assume that I could go through and clean up the resulting files (including deduping overlapping entries between runs) and then make some kind of pretty searchable archive. I've just never bothered.

I run it with a little shell script like:
thedate=`date +%F | sed 's/-/./g'`;
mkdir $thedate;
cd $thedate;
python ../slack_history.py --token YOURTOKENHERE
I also modified the script to add a "time.sleep(30)" on line 107, which seems to be necessary to prevent the script from being blocked for exceeding some kind of rate limit.

The comments on that gist also seem to indicate that there are perhaps other, newer versions of that script floating around. Might be worth your while to investigate those!
posted by chrisamiller at 8:56 PM on December 27, 2018


« Older Change my first name at 50?   |   What was the first ska song played on KROQ? Newer »
This thread is closed to new comments.