Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-add a bot to all channels on Slack?

I am the admin of a Slack team.

Is there a way that I can auto-invite a bot to all slack channels that are created in my team?

like image 225
Archit Kejriwal Avatar asked Dec 21 '16 06:12

Archit Kejriwal


1 Answers

Yes, that is possible for public channels, but not for private channels.

You can subscribe to event types and use either the RTM API or the Event API to make your bot listen to those events and react accordingly.

The event channel_created will be triggered each time a new public channel is created.

Unfortunately there is no pendant (e.g. group_created) for private channels (called "groups" in the API). I am guessing this is for security reasons. Private channels can only be accessed by a user or bot that is invited, so even admins and owners can not access private channels on their Slack team, which there have not been invited to.

like image 54
Erik Kalkoken Avatar answered Nov 09 '22 12:11

Erik Kalkoken