A Python bot that checks a Notion database for member birthdays and sends a celebratory message to a Discord channel via webhook. Written by: Liam
See .env.example
for required variables.
NOTION_TOKEN
: Notion integration tokenDATABASE_ID
: Notion database IDWEBHOOK_URL
: Discord webhook URLHR_DISCORD_ID
: Discord HR role ID to tag
- Fetches member data from Notion.
- Checks if today is any member’s birthday.
- Sends a Discord message tagging the HR role for each birthday.
- Python 3.9+
- Notion integration and database
- Discord webhook URL
-
Clone the repository:
git clone <repo-url> cd discord-bday-python-bot
-
Create and activate a virtual environment:
python -m venv .venv .venv\Scripts\activate # On Windows # Or source .venv/bin/activate # On macOS/Linux
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
- Copy
.env.example
to.env
and fill in your values.
- Copy
-
Run locally:
python main.py