This book will enable a beginner to create their own Slack bot either for amusement or professional purposes.
The ultimate goal of this book is for you to think of Slack as a development platform with great potential, rather than simply a chat client. As Slack continues its meteoric rise in popularity in the developer community, the possibilities and opportunities contained in Slack apps will prove to be a valuable tool in any developer's toolbox.
In this chapter, we introduce you to Slack and its possibilities. We will cover:
An introduction to Slack
Slack as a platform
The end goal
Launched in August 2013, Slack started as an internal communication tool utilized by small teams but has been rapidly morphing into a versatile communications platform used by many parties, including the open source community and large businesses.
Slack is a real-time messaging application that specializes in team communication. In a crowded space of productivity applications, Slack sets itself apart by providing extensive integrations with popular third-party apps and provides users with the platform to build their own integrations.
As of the beginning of 2016, Slack is used by approximately 2 million users daily, and spread across 60,000 teams that send 800 million messages per month (http://expandedramblings.com/index.php/slack-statistics/). Some of the more well known companies who use Slack include Airbnb, LinkedIn, and The New York Times. This service has become so popular, largely thanks to its impressive uptime rate of over 99.9 percent. What sets Slack apart from competition such as HipChat or Skype for Business is the determination of the company to open its platform for third-party developers in the form of an application program interface (API). To spur the growth of their service as a platform, in December 2015 Slack pledged to invest $80 million into software projects that use its technology (http://fortune.com/2015/12/15/slack-app-investment-fund/). Added to the more than $320 million raised in funding for the company, it's safe to say that Slack will continue to be a driving force in the team productivity space in the years to come.
What many users perhaps don't know about Slack is that underneath the messaging client, a highly extensible platform exists that can be used to create apps and business tools that can simplify the development cycle, perform complex tasks, or just be downright silly.

Slack's UI with its own Slack bot in action
This platform or API can be utilized to integrate third-party services into Slack's platform and leverage their extensive reach and user friendly interface. The said third-party applications can send data into Slack via incoming webhooks, execute actions outside of Slack with commands, or respond to commands as a bot user. The bot user or bot is the most interesting; they are so named as they can mimic human users by performing the same actions that any human can.
Note
Slack bots are software applications that run on the Slack Real Time Messaging (RTM) platform. Bots can be used to interact with external applications or your custom code in a conversational manner.
Some of the more popular bots include GitHub's multitasking Hubot (https://hubot.github.com/) and Meekan's scheduling bot (http://meekan.com/slack/), but many more of varying complexity are developed each day.
The most obvious and well known bot is Slack's own Slack bot, used for built-in Slack functions such as:
Sending feedback to Slack
Scheduling reminders
Printing a list of all users in a channel
Another widely popular bot is Hubot. Originally developed by GitHub and ported to Slack by Slack themselves, Hubot can provide useful functionality such as GitHub activity tracking, which can keep you up to date with GitHub repositories.

GitHub integration showing branch and pull request activity
You can also add infrastructure monitoring through Jenkins:

Jenkins integration bot showing build automation logs in Slack
Bots can transform Slack from a simple messaging client to an important business tool, benefitting any company that uses custom bots unique to their workflow. The beauty of the Slack platform is that anyone can create a functional bot in a few simple steps.
Upon completing this book, the reader will be able to build a complex Slack bot that can perform the following tasks, amongst other things:
Receive and send message sent in Slack
Respond to user commands
Process natural language
Perform useful tasks on command (for example, fetch data from external sources)
Insert custom data into Slack via webhooks and slash commands