Send messages to Slack using Python

Tutorial: Python Slack Bot

Gonzalo Fernandez Plaza
4 min readApr 26, 2022

--

Hello everyone! This post will show us how to use the Slack API in Python. To do this, we will create a Python application that will send daily information to the Slack channel that we want. This is going to be the final behavior.

Final Setup of my application.
Final Setup of my application.

For this purpose, we will divide the tutorial into the following points:

  1. Creation of a Slack application
  2. Creation of a Slack channel and authorize the Slack app
  3. Integration with the Python Script using the Slack API

Let’s start wiht it! Also, remember that you can check my courses about AWS and SnowFlake at my profile:

CREATION OF A SLACK APPLICATION

1) Create the application

To do it, we have different options. We can go to the Slack API page and create one directly (scroll down a little bit on this page to see the option): https://api.slack.com/tutorials/tracks/getting-a-token

--

--

Gonzalo Fernandez Plaza

Computer Science Engineer & Tech Lead 🖥️. Publishing AWS & Snowflake ❄️ courses & exams. https://www.fullcertified.com