O'Reilly logo

Building Slack Bots by Paul Asjes

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Your First Bot

Readers will be amazed at how few lines of code are required to get a basic bot up and running in their Slack environment. This chapter will walk the reader through the basics of building a Slack bot:

  • Preparing your environment
  • Creating a Slack API token
  • Connecting your bot
  • Joining a channel
  • Sending a message to a channel
  • Basic responses
  • Sending a direct message
  • Restricting access
  • Debugging your bot

Although some of the concepts first outlined will be known to a more advanced reader, it is still recommended to read through the first few sections of this chapter to ensure that your environment is up and ready to go.

In this chapter, we will build a bot that performs the following actions:

  • Connects to your Slack team
  • Says hello to all ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required