During the peak vaccine demand in India, vaccine slots were hard to book as slots got filled like on a black Friday sale. We worked on making the process of finding vaccines a lot easier.
The solution had to solve few main problems
- Users should be able to receive updates when the vaccine is available in their area, thus avoiding the need to constantly log in to CoWin portal.
- Users should also get details like vaccine type, which dose is administered and what date the vaccination drive is scheduled.
To make the solution widely available, a telegram bot seemed the most suitable choice.
The bot was build using the official telegram bot framework. The server side of the bot queried the official CoWin (India's centralized online platform to book vaccine appointments) API periodically and sends the updates to users.
The bot was initially built to serve family and close friends but soon became available to a wider audience.
Users at peak | 1733 |
Pincodes served | 581 |
Broadcasts updates sent so far | 1.96 M (1,961,394) |
Getting Info from user | User getting updates |
- Install required packages (see requirement.txt for complete list)
- Telegram BOT library
- SQL DB System - MariaDB, MySQL, or SQLite
- SQL Alchemy (used as ORM)
- Generate token for bot with the help from BotFather
- Provide DB credential via JSON file
{ "DB_SETTINGS" : { "host" : "<db-host-address>", "name" : "<db-name>", "username" : "<db-username>", "password" : "<db-pass>" } }
- Provide Bot Token key and DB credentials via environment variables
- Bot token - COWIN_TEL_BOT_KEY
- DB credentials (path to config in JSON format) - DB_INFO_FILE