DEV Community

Discussion on: Help with getting started in building bot for Slack

Collapse
 
brandinchiu profile image
Brandin Chiu

This discussion will be heavily dependant on what you're trying to do with your "bot".

A Slack "bot" is more or less just an application that responds to API requests. The only main difference is that the API requests are coming from Slack.

The users interacting with the bot in some cases aren't actually "messaging" the bot -- they're invoking actions in Slack that translate into commands that are interpreted and responded to by the bot (and the application backing it).

For example, the easiest to build bots simply listen for commands being entered into the chat window in Slack (like /dosomething or /takesomeaction). These are trivially easy to set up.

Collapse
 
nav_devl profile image
Naveen Honest Raj

Thanks for the quick reply.

So what I am trying to build with the bot covers something like, fetching from an external resource and show up in Slack Bot's Home page and also enable the bot to receive commands and process them. Mostly with Home Page open event and command event is what my bot's purpose is defined with.

Collapse
 
brandinchiu profile image
Brandin Chiu

If your bot doesn't actually need to "communicate" with users by interpreting arbitrary text, then you might simply need to build a slack "app" which is much easier to work with and can be backed by anything.

It's essentially just an api you build with a slack frontend.

Have you started the process of actually creating the "app" in the slack interface yet?

Thread Thread
 
nav_devl profile image
Naveen Honest Raj

Understood. Understood. So there are only few scenarios where the RTM focused frameworks allows us to easily use them powerfully. Am I right?

Yes, I have started using the Python's slack event API in combination with Flask. The MVP is 80% done. I just wanted to try out and learn it in the process.

Thread Thread
 
brandinchiu profile image
Brandin Chiu

RTM is very rarely needed for most slack apps. The majority use webhooks and http requests to trigger activity.

Thread Thread
 
nav_devl profile image
Naveen Honest Raj

Understood understood. Thanks a lot for helping to see me things with better clarity.