Slack Pings Bot
Requirements
- Python 3.10+ https://www.python.org/downloads/
Creating the bot on Slack
- Go to https://api.slack.com/
- Log into your account. You may be redirected to another page. Please return to the page above if redirected after logging in
- Click on Create a new App
- Choose from Manifest
- Choose JSON
- Copy all the contents in the manifest.json file inside this folder and paste it there
- Create bot
- Install bot in your workspace. Copy the bot token and paste it inside of the quotation marks in the SLACK_BOT_TOKEN variable in the
settings.jsonfile - Copy the app token and paste it inside of the quotation marks in the SLACK_APP_TOKEN variable in the
settings.jsonfile.
Installation
- Extract the zip onto a folder
- Open terminal or CMD and cd onto the folder. (If you're on mac just drag the folder to the terminal!)
- Rename
sample_settings.jsontosettings.json - Run
python3 main.pyorpy main.py - The bot is running!
Purpose: The Slack-Pings-Bot is a Python bot for Slack that tracks when users are mentioned (pinged) in messages and displays these pings in the user's Slack home tab.
Main Features:
Message Tracking: When a message contains a user mention (e.g., <@user_id>), the bot saves the message link, the person who pinged, and the person who was pinged in a local SQLite database. Home Tab Notifications: When a user opens their Slack app home tab, the bot displays a list of all pings (mentions) they have received, showing who pinged them and providing a direct link to the relevant message. Dismissal Actions: Users can dismiss individual pings from their home tab via a button, which removes that ping from the database. No Pings Message: If a user has no pings, the bot shows a message saying "You have no pings". Setup:
You must create a Slack app, install it in your workspace, and provide bot/app tokens in a settings.json file. The bot runs as a Python script (main.py) and uses Slack Bolt for event handling. Technical Details:
Uses sqlite3 for local storage of pings. Handles Slack events: message (to track mentions) app_home_opened (to display pings) Provides interactive Slack UI blocks (with buttons) for dismissing notifications.

Log in or sign up for Devpost to join the conversation.