Skip to main content

A sexy, simple, yet powerful and extendable Slack bot

Project description

Join the chat at

Slack Machine is a sexy, simple, yet powerful and extendable Slack bot. More than just a bot, Slack Machine is a framework that helps you develop your Slack team into a ChatOps powerhouse.



As of v0.19 there are some breaking changes! If you’re using v0.18.2 or older, you might have to make some changes to your slack bot built with Slack Machine and/or Slack Machine plugins. The following changes are non-backwards compatible:

  • The catch_all method has been removed from the base plugin class. You can still respond to specific event types using the @process decorator
  • The *_webapi methods to send messages do not exist anymore, use the regular counterparts instead. All messages are now sent using the Slack WebAPI. The RTM API is still used for listening to messages and events.
  • self.users and self.channels now return different objects than before. See API documentation for more details. These properties should behave more consistently however, even in workspaces with many users.


  • Get started with mininal configuration
  • Built on top of the Slack RTM API for smooth, real-time interactions
  • Support for rich interactions using the Slack Web API
  • High-level API for maximum convenience when building plugins
  • Low-level API for maximum flexibility
  • Plugin API features:
    • Listen and respond to any regular expression
    • Capture parts of messages to use as variables in your functions
    • Respond to messages in channels, groups and direct message conversations
    • Respond with Emoji
    • Respond in threads
    • Respond with ephemeral messages
    • Send DMs to any user
    • Support for message attachments
    • Support for blocks
    • Listen and respond to any Slack event supported by the RTM API
    • Store and retrieve any kind of data in persistent storage (currently Redis and in-memory storage are supported)
    • Schedule actions and messages
    • Emit and listen for events
    • Help texts for Plugins
    • Built in web server for webhooks

Coming Soon

  • Support for Interactive Buttons
  • … and much more


You can install Slack Machine using pip:

$ pip install slack-machine

It is strongly recommended that you install slack-machine inside a virtual environment!


  1. Create a directory for your Slack Machine bot: mkdir my-slack-bot && cd my-slack-bot
  2. Add a file to your bot directory: touch
  3. Create a Bot User for your Slack team: (take note of your API token)
  4. Add the Slack API token to your like this:
SLACK_API_TOKEN = 'xox-my-slack-token'
  1. Start the bot with slack-machine
  2. ...
  3. Profit!


You can find the documentation for Slack Machine here:

Go read it to learn how to properly configure Slack Machine, write plugins, and more!

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for slack-machine, version 0.21.0
Filename, size File type Python version Upload date Hashes
Filename, size slack_machine-0.21.0-py2.py3-none-any.whl (95.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size slack-machine-0.21.0.tar.gz (130.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page