Book Details

ISBN 139781786460806

Paperback182 pages

Book Description

Slack promises that its users will "be less busy." Slack bots interact with users in Slack chatrooms, providing useful immediate information, and automating work. This book gives you everything you need to build powerful and useful Slack bots.

You’ll see how to hook into the Slack API to create software that can read and post to chatrooms, respond to commands and hints given in natural conversational language, and build fun and useful bots for your own place of work, both as a front end to your own service and to distribute and share as apps. You can even sell your bots and build a business as a Slack bot developer.

Throughout the book, you’ll build useful and fun example applications that you can modify for your own situations. These range from simple, fun applications to liven up discussions to useful, data-driven apps to help you make decisions quickly and manage work.

Table of Contents

Chapter 1: Getting Started with Slack

Introduction to Slack

Slack as a platform

The end goal

Summary

Chapter 2: Your First Bot

Preparing your environment

Basic responses

Sending a direct message

Restricting access

Debugging a bot

Summary

Chapter 3: Adding Complexity

Responding to keywords

Bot commands

External API integration

Summary

Chapter 4: Using Data

Introduction to Redis

Connecting to Redis

Saving and retrieving data

Best practices

Simple to-do example

Summary

Chapter 5: Understanding and Responding to Natural Language

A brief introduction to natural language

Fundamentals of NLP

Tokenizers

Stemmers

String distance

Inflection

Displaying data in a natural way

When to use NLP?

Mentions

Classifiers

Using trained classifiers

Natural language generation

When should we use natural language generation?

The uncanny valley

Summary

Chapter 6: Webhooks and Slash Commands

Webhooks

Slash commands

In-channel and ephemeral responses

Using webhooks and slash commands

Summary

Chapter 7: Publishing Your App

The Slack app directory

Registering your app and obtaining tokens

Understanding the OAuth process

Scopes

Submitting your app to the app directory

Monetizing your bot

Summary

What You Will Learn

Receive and send messages sent in Slack

Respond to user commands

Process natural language

Perform useful tasks on commands such as fetching data from external sources

Use webhooks and slash commands

Create a Google Classroom and add customized information for each individual class

Authors

Paul Asjes

Paul Asjes started programming on his TI-83 calculator in high school and has been hooked ever since.

Specializing in JavaScript, he is always interested in staying up to date with the latest developments in the field. Currently, he is building universal full-stack apps with technologies such as React, Webpack, and Node when he's not spending far too much time on Slack.

Since his IRC days, he has been interested in chat bots and how they can be used. He has written several Slack bots to date, ranging from bots that facilitate playing games to bots that retrieve important business metrics.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.