Create a bot for your workspace

A bot is a nifty way to run code and automate tasks. In Slack, a bot is controlled programmatically via a bot user token that can access one or more of Slack’s APIs. Read on to learn more about creating a bot for your workspace. 🤖

What can bots do?

  • Monitor and help to process channel activity
  • Post messages in channels and react to members’ activity
  • Make channel messages interactive using buttons


Get to know bots

Bots can do a lot of the same things in Slack that regular members can:

Bots can only do what you program them to do in a specific channel. So, someone can’t sign in as a bot and do things that other workspace members can do in Slack. Bots also can't be set as workspace owners or admins.


Add a bot user

  1. Create a Slack app if you don't already have one, or select an existing app that you've created.
  2. Click on the OAuth & permissions tab in the left sidebar.
  3. Below Bot token scopes, select one or more scopes. Then click on Add an OAuth scope.
  4. Click on the App Home tab in the left sidebar to view the bot user and the configuration that you’ve added.


Get the most out of a bot user

Let's dive deeper into the ways that bots can affect your workspace and help things to run more efficiently.

👀  Monitor and process channel activity
A bot can help to monitor and process activity in the public and private channels that it’s been invited to, as well as messages that have been sent to it via direct message.

📝  Post messages and react to members
In addition to receiving messages, a bot can also post messages in channels that it’s a member of.

🎯  Make messages interactive using buttons 
When attached to a Slack app, bots can add interactive components (such as buttons) to messages, which members can interact with. These interactive components trigger specific actions on your servers, so that you can perform certain tasks. Take a look at our blog to learn more.

Tip: You can rename bot users if you like. To do so, go to the app page in the App Directory. Find the bot's name, then click on the pencil icon to enter a different one.


Additional bot resources

To learn more about building bots, take a look at our Slack API documentation. We also have a few other handy resources to help you along the way: