Before creating a Slack bot we will explore the APIs. This will give us the knowledge needed to sketch out an architecture.
- [Narrator] So we want to build a Slackbot.…Let's get into the details of the bot a bit later.…Before we start designing our application,…it makes sense to have a look at its API.…So let's go to api.slack.com.…We see that Slack offers a lot.…And let's look at API here.…The Web API provides us with a way…to communicate with Slack.…It's a typical chase-based HTTP API.…Let's review the methods.…By looking closer we see that it provides us with quite…everything except a way to get messages pushed to us.…
But there is a menu item called Real Time Messaging API.…This looks promising.…The intro on this page reads:…The Real Time Messaging API is a WebSocket based API…that allows you to receive events from Slack in real time…and send messages to users.…It's sometimes referred to as simply the "RTM API".…I think this is what we are looking for,…but what are WebSockets again?…Regular HTTP requests are stateless.…You request a page, the server processes the request,…and sends the response.…
After the request is processed,…there is no connection between the client and the server.…
After explaining some basics about Node.js and microservices, Daniel shows you how to sketch out the planned architecture for your application and get the boilerplate code, modules, and credentials in place. Next, he shows how to create a bot user in Slack, connect to Slack, and post messages. He also shows you how to get your bot to process variations in text by creating logic that delegates the processing of intent to dedicated modules. Lastly, he shows how to register additional services and he covers how to use monitoring to identify architectural or performance issues.
- Using Slack APIs
- Sketching out a Slack bot architecture
- Setting up a project and choosing modules
- Creating and naming your bot
- Connecting to Slack
- Setting up and using natural language processing
- Routing by intents
- Implementing geocoding and time calculation
- Adding and monitoring services