Auto-add a bot to all channels on Slack?

5k views Asked by At

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?

1

There are 1 answers

1
Erik Kalkoken On

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.