Slide 1

Slide 1 text

Building Slack Bots From Scratch 23rd, September, 2017 Omolara Adejuwon @_larikraun

Slide 2

Slide 2 text

Bots? What are those?

Slide 3

Slide 3 text

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.

Slide 4

Slide 4 text

Let’s drill down to chatbots

Slide 5

Slide 5 text

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.

Slide 6

Slide 6 text

How does Slack come in?

Slide 7

Slide 7 text

Slack Internal Integrations Incoming Webhooks Slash commands Bot users

Slide 8

Slide 8 text

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.

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

Resources ● 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

Slide 12

Slide 12 text

Let’s build a simple slack bot Link to Repo: https://github.com/larikraun/slackbotdemo

Slide 13

Slide 13 text

Thank you https://github.com/larikraun