Slack Integration works a bit too well

I have my local bot connected to Slack via ngrok and a specific channel. It seems that the bot listens to everything in all channels and will sit there commenting any time anyone posts anything to any channel haha. It’s like a little old man that has to comment on everyone’s conversations (which gives me a great idea for another fun bot).

Is it possible to configure it to only listen in the channel it is deployed to?

Should I remove some of the Workspace events it is subscribed to?

This is what I have setup right now -

image

And the Subscribed Bot Events if that helps -

image

It’s like a little old man that has to comment on everyone’s conversations (which gives me a great idea for another fun bot).

Haha, I love this :smile:

Not sure about configuring to listen only on certain channels – might be something you have to ask the Slack people. However as long as you don’t need the bot in e.g. private channels, you can remove the bot from listening to private channels.

:slight_smile: I’ve already been planning my old-man generic sarcastic responses: “What?” “Can you type louder, I can’t really hear you in this channel” “Do you even think before you type?” “Kids”

As far as the config issue goes, I was under the impression that the slack_channel: "#rasa-chat" option in credentials.yml would have kept it to that channel.

I was playing around with the “Subscribe to Workspace Events” and I think the culprit is message.channels. I’ll keep poking around. This isn’t that big of a deal for me, the bot will eventually get used via the web. I was just hooking it to Slack so some coworkers could test it out.

Yeah, the slack channel parameter is used to tell it in which channel to post (which can also be overwritten by a keyword arg), not what to listen to. But yeah, interesting to point out! I also noticed that when setting up a bot and looking at all the requests that hit the ngrok url.

Thanks for that clarification.

A coworker mentioned a possible Slack setup that may help. Not sure I want to go through the trouble to reconfigure Slack and possibly annoy coworkers if I start messing with how notifications work. There also may be a way to mute the bot on other channels or something. I’m not a Slack guru (yet)

I’ll let you know if I either launch a crotchety old man bot, or if I stumble across something to limit it’s listening abilities.

1 Like