Back to Browse

How to build a simple Slack bot using the Bolt framework for Python

12.9K views
Sep 10, 2021
9:58

In this video we build a simple Slack bot that returns a random joke upon typing "joke" in a DM message to the bot. We will explore how to configure the Slack app with the right permissions and settings. We will see how to load in environment variables using python-dotenv, retrieve a random joke using pyjokes, and work with the Slack Bolt API. We hope you enjoy this short training and let us know below what Slack bot you have built or will build ... App code: https://github.com/bbelderbos/slack-bot-demo Mentioned/ related links and tools: - Getting started with Bolt for Python: https://slack.dev/bolt-python/tutorial/getting-started - Bolt API docs: https://slack.dev/bolt-python/concepts - Managing environment variables in Python (python-dotenv): https://pybit.es/articles/how-to-handle-environment-variables-in-python/ - pyjokes: https://pypi.org/project/pyjokes/ - A really cool bot we run on our Slack and is one of our opensource projects: https://github.com/PyBites-Open-Source/karmabot - Join our Slack Community: https://pybit.es/community ---------------------------- There's plenty more to discover with PyBites: Check out our Python tips book: https://pybit.es/tips You can also subscribe to receive weekly Python / Career / Mindset tips straight to your inbox here: https://codechalleng.es/tips To work with us 1:1 to develop that complex project you've always wanted to build, check out our coaching program: https://pybitesdevelopermindset.com/ If you'd prefer to listen to us on the go, we discuss the mindset crucial for a successful developer on our podcast: https://www.pybitespodcast.com/ Visit us at https://pybit.es to find out how we can help you on your Python journey. Also we'd love to hear what you want more training and content on, just comment below or send us an email at info at pybit.es!

Download

0 formats

No download links available.

How to build a simple Slack bot using the Bolt framework for Python | NatokHD