Slack N study!

Pankajashree R
2 min readJun 1, 2017

“Hi guys! Is there a group for studying React?“

“Is there a group that discusses about Freelancing?”

How convenient would it be if answers to such questions were automated, since no member really knows the list of all the private groups in a Slack team, apart from the admin of the team. That’s when Parminder Singh and I teamed up over the weekend to build a Slash command app (/sns) that connects to a database of private-channel-study-groups and their topics for users to find them easily. We collaborated on this wonderful platform known as glitch.

At first we pondered over an idea of a bot. But Slack provides another app , Slash commands. Unlike bots, a slash command doesn’t listen to all the incoming messages and it doesn’t have a rate limit. Since slash command is faster and less-resource-intensive, we chose to build one.

We initially thought of 3 commands — They are pretty straight-forward operations and we thought we could finish it over the weekend. But we were dealing with Private Channels mainly and Private Channels are tough to deal with on Slack.

/sns set [topic]to add a channel to the database. Sets the topic of the private channel and adds it to database

/sns find [topic]to search for a channel related to a topic

/sns show-all to show the list of channels stored in the database.

Chance Taken suggested another command /sns add-to [channel], which would be useful when the user wants to join a private channel.

The add-to functionality was a tough one to crack. In Slack, neither a bot nor a slash command can send a message to the private group. Only an authorized member of a private-group can invite a user to join the group. To authorize a member of a group, we included an authorization link in the set functionality. Then we used Slack API to add a new user to the group as invitation from the authorized user. Now if any one user per study-group is authorized in our database, then anybody can join the group using /sns add-to [channel]. Previously we had to rely on the group’s creator or the admin for getting an invitation to join a group.

At first we built this with Chingu-Central in mind. But any Slack team can use this to make their lives easier! :D

So here, we present to you, Slack N Study!

Online collaborations are hard. But anything can happen at Chingu Cohorts! ;) Never had I imagined that we could finish a virtual team project in just about 5 days. Parminder Singh was great to work with. He is an awesome, supportive and dedicated team mate.

--

--