2

I am creating a Slack app that listens for a type of message (ie. one that starts with the word "bot") from a user in any public channel, and responds to that with an action.

I can manage all of this using the Events API, but the delay on each request is unusably slow. If I use the RTM websocket API, the response would be near instant.

However, the RTM API rate limits connections to one user per minute. An app with 120 users would take 2 hours to start up.

Is there a way I can create one connection per workspace? Ideally this would combine all messages sent in that team and I would filter extraneous messages out later.

Things I've tried:

  • adding the bot to every channel in the workspace. This is not very practical.

Thank you in advance!

cbwi
  • 33
  • 1
  • 6

1 Answers1

0

This is the scenario the app_mention event was created to solve. The app_mention allows your app to behave like other users in a workspace — when they are mentioned, the user has the option to invite the bot into channel. If the bot is invited in, your app receives the message and can respond accordingly.

jimray
  • 109
  • 2
  • Hello, and thank you for your response. I am actually looking for a solution that matches ANY given text posted by an authenticated user, and not just a mention to the app. – cbwi Jun 17 '21 at 17:36