This was presented at the ForLoopWomen 2.0 on the 23rd of September, 2017. It focuses on guiding anyone who wants to take a look at building slackbots.
Building Slack Bots From Scratch
23rd, September, 2017
Bots? What are those?
Bots are built to automate some certain tasks. They are
expected to deliver the tasks faster and better than humans.
They can come in whatever form you deem fit e.g chatbots,
crawlers, informational bots, entertainment bots.
Let’s drill down to chatbots
Chatbots are built to simulate real conversations. They are built on
predefined instructions, keywords and analysis.
Many of them live on existing communication tools like Slack, Messenger,
Skype and many more.
We have also seen many of them on the ‘Live Chat’ sections of many
websites. They are everywhere.
How does Slack come in?
Slack Internal Integrations
Incoming Webhooks Slash commands
Slack Bot Users
They are special kinds of users that observe & respond to conversational
interactions in channels and direct messages. They can do almost everything a
regular slack user can do.
Bot users ride on Slack’s Web API, Events API and RTM API.
To get started, you need
● A slack workspace
● A bot user that has been integrated to your workspace
● An API token
● A knowledge of a server side language
● API.AI - if you need some level of natural language processing (NLP).
● A server to host your files
Slack allows you listen to events and triggers. Your app logic then how
your bot responds to each of the events you have subscribed to.
All the events available are here
● Slack’s API docs. https://api.slack.com/
● API.AI docs https://api.ai/docs/getting-started/basics
● There are some reliable open source slack clients in different languages e.g
BotKit(NodeJS), PHP Slack Client, Python Slack Client
Let’s build a simple slack bot
Link to Repo: https://github.com/larikraun/slackbotdemo