How to Build a Slack Chat bot in Python

Intro - How to Build a Slack Chat bot in Python
with melight|10 years experience|Python
34680views
How to Build a Slack Chat bot in Python
- English
- Programming
Python
- Project length: 3h 18m
We’ll build a Slack Chat Bot in Python. We’ll cover the architecture and all the elements needed to run a fully functional bot, the dev environment setup, the authentication/installation process of a bot by a team and multiple teams, and we’ll look into bot plugins - i.e. bot behavior. At the end of this this series you’ll be able to build your own Slack chat bot that can service multiple teams, from scratch. Wherever possible, I’m aiming to use the simplest and most straightforward tools in order to keep the focus on bot building and not get distracted by tooling. You're most welcome to message me if you have any questions.
Overview
Project Introduction:
We’ll build a Slack Chat Bot in Python. We’ll cover the environment needed to run a Slack chat bot, the authentication/installation process of a bot by a team and multiple teams, and we’ll look into bot plugins - i.e. bot behaviour. At the end of this this series you’ll be able to build your own Slack chat bot that can service multiple teams, from scratch. Wherever possible, I’m aiming to use the simplest and most straightforward tools in order to keep the focus on bot building and not get distracted by tooling.
Requirements:
- Slack team (it's free)
- Python knowledge
- Basic HTML/CSS
- Basic understanding of databases
Target audience:
- You want to build Slack chat bots
- You want to make your bot usable by multiple teams
You want to give your bot more complex behaviours
Streaming schedule:
Weekly 13pm EST New York time on Wednesdays
Project Outline
Session 1+2:
1: Architecture overview and setting-up the Environment
- Overview of elements needed to make a complete functioning bot
- Setting up the programming environment for windows:
- Web server, database, bot server library
2: Bot skeleton
- Creating bot app on Slack - keys, ids, tokens, relevant URLs etc
- Writing basic echo bot with static OAuth tokens (for a single team)
Session 3a: Install automation A
- Building the authentication/installation page + approval handler
Session 3b: Install automation B
- Managing teams approval credentials
- Running bot for multiple teams programmatically
Session 3c: Install automation C
- Automatically starting bot for teams who approved bot
Session 4: Changing bot behaviour/Plugins
- Plugins overview
- Writing a simple behavior plugin (static content)
- Writing a more complex plugin (dynamic web content)