A Python CLI app that checks your unpaid bills and sends Telegram notifications for bills due within the next 4 days. Built to replace an n8n workflow using clean architecture principles.
- Reads bills from a CSV file
- Filters unpaid bills due within a configurable number of days
- Sends Telegram notifications via the Telegram Bot API
- Clean architecture: models, repository pattern, service layer
bill-reminder/
├── app/
│ ├── models/
│ │ ├── bill.py
│ │ └── bill_type.py
│ ├── repositories/
│ │ └── bill_repository.py
│ └── services/
│ └── telegram_notification_service.py
├── data/
│ └── bills.csv
├── tests/
├── main.py
├── .env
├── requirements.txt
└── README.md
-
Clone the repository
git clone https://github.com/your-username/bill-reminder.git cd bill-reminder -
Create a virtual environment and install dependencies
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Configure environment variables
Create a
.envfile at the root:TELEGRAM_BOT_TOKEN=your_bot_token_here TELEGRAM_CHAT_ID=your_chat_id_here -
Prepare your CSV file
Create
data/bills.csvwith the following format:id,title,description,amount,due_date,is_payed,is_notification_enabled,bill_type 1,Internet,Monthly internet bill,50.00,28/02/2026,false,true,subscription
python main.py| Column | Type | Format | Example |
|---|---|---|---|
| id | int | — | 1 |
| title | str | — | Internet |
| description | str | — | Monthly bill |
| amount | float | — | 50.00 |
| due_date | date | dd/mm/yyyy | 28/02/2026 |
| is_payed | bool | true/false | false |
| is_notification_enabled | bool | true/false | true |
| bill_type | str | bill/subscription | subscription |
- Create a bot via @BotFather and get your token
- Send a message to your bot
- Visit
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates - Copy the
chat_idfrom the response
- Python 3.10+
requests— HTTP calls to Telegram APIpython-dotenv— environment variable managementpytest— testing
MIT