Auto-Send Slack Invites

Recently, we wanted to create a Slack group for a meetup group in our city. We also wanted to auto-send Slack invites to folks so the admins didn’t have to.

Everyone (especially devs!) love Slack, and we’re on it all the time. One of the best ways we can keep in touch outside of the meetup (meetup.com doesn’t really have a good interface for chatting with group members in between meetups) is to make sure we’re able to communicate and ask questions here between meetups.

One of the bummers (and great security features) about Slack is that you have to send people an invitation to join the group. Well, what if we just want something a little more automated?

After googling around, I found several solutions and some API references for this.

Currently, the easiest solution to get up and running with was here:

https://github.com/outsideris/slack-invite-automation

Literally, you can just click on the “Deploy to Heroku” button, enter some credentials, and voila, you have an app that will auto-send slack invites.

Here’s the launched app:

https://madison-wordpress-slack.herokuapp.com/

I looked at another app here, but it didn’t seem to work right out of the box:

https://github.com/rauchg/slackin/blob/master/lib/slack-invite.js

I’m sure this was just user error on my part, but wanted to note it here.

 

Here are a couple more API references and notes on trying to do this kind of thing, including some undocumented API endpoints.

https://api.slack.com/apps

https://github.com/ErikKalkoken/slackApiDoc/blob/master/users.admin.invite.md

 

If you’re looking to get Slack going for a community group, and you’d like to automate the initations, I’d recommend this approach.

 

Eventually, when we get a Madison WordPress Meetup site set up, we’ll move this functionality into a plugin and make the API calls from there. For now, even though the app is on Heroku’s free tier, this will work just fine.

Cheers,

Nate Finch


Photo by Javier Molina on Unsplash

One Reply to “Auto-Send Slack Invites”

  1. Very Nice Information for us …. thankyou for sharing your knowledge.

    Regards
    Vastu Consultant
    Dr. Anand Bhardwaj

    Reply

Leave a Reply

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