Are you slacking yet?

If you’ve not heard of it, Slack is where all the cool kids hang out nowadays, to discuss projects, issues, lunch plans, etc. with their colleagues.

If you have heard of it then you’ll know it’s generally meant as something of a walled garden, but we wanted to add an “offline” discussion area for UnmetHours. Somewhere  users could be directed if they need a bit more guidance than can be given on a Q&A forum. There’s precedent for this “Open Slack” concept, but the process shown on for the #nomads site seemed a bit unwieldy (and uses PHP). This I think is a bit simpler (and uses Python which we all know is just better all round).


So here’s the process to allow anyone to request an automatic invite to your Slack. You just need to give them the email address to send the request to.

The steps are:

1) Sign up a Gmail account to your slack, ideally a dedicated account. You might want to call it “<your slack name>”
2) Give the bot account admin privileges
3) Set up an API key for the bot account
4) Set up the script below with your Slack API key, Slack name, and the bot’s Gmail credentials
5) Create a scheduled task (Windows), cronjob (Linux) or launchd (Mac) to run the script as often as you want
6) Share the email address and subject tag, sit back and start Slacking

The really cool thing is you now have a bot that can respond to other subject tags with not much extra work. It could respond to requests for information, let people subscribe to a mailing list (or unsubscribe), or anything else you can think of. The basics are there, but go wild and think what else you could automate.

What are you waiting for? Get back to Slacking!

Jamie Bull |

Related Posts

WiGLE is a popular platform which can be used for finding the location of a device using the names of WiFi networks in its vicinity. I’ve written about this before, and wrote some Python code to interact with their API. This API has since been retired and replaced with a new one, as of December […]

Just a quick post to point out a couple of really useful tools.The first is a web-based tool for finding weather files for a location of interest. It’s similar to the Excel EPW finder tool we created a few years back, but much more modern looking. It is however missing a few of the useful […]

Eppy is a really useful library which I’ve written about several times, since before I really had anything to offer in terms of contributing code. Over the past year or so though, I’ve started to contribute back some of the changes and additions I’ve made while using eppy on academic and commercial projects.This post is […]

2 Comments on “Open up invites to your Slack using a Gmail bot”

  • Hi Jamie,
    Okay I got it, but how can we resend invite to all pending members where the numbers are 300+. Going back to slack and clicking “resend” or “revoke” is a manual process as you can’t use bulk actions. Do you have any solution for that?

    • Jamie Bull says:

      Hi Abinash, I’m afraid not. I just had bash at a quick scraping approach but authentication is a little awkward and I don’t have the time to dig into it right now.

Leave a Reply

Your email address will not be published. Required fields are marked *