Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Slackbots from Scratch

Building Slackbots from Scratch

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.

Omolara Adejuwon

September 23, 2017
Tweet

More Decks by Omolara Adejuwon

Other Decks in Programming

Transcript

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

    View full-size slide

  2. Bots? What are those?

    View full-size slide

  3. 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.

    View full-size slide

  4. Let’s drill down to chatbots

    View full-size slide

  5. 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.

    View full-size slide

  6. How does Slack come in?

    View full-size slide

  7. Slack Internal Integrations
    Incoming Webhooks Slash commands
    Bot users

    View full-size slide

  8. 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.

    View full-size slide

  9. 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

    View full-size slide

  10. 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

    View full-size slide

  11. 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

    View full-size slide

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

    View full-size slide

  13. Thank you
    https://github.com/larikraun

    View full-size slide