Telegram Bot for dealing with Google Sheets in Python using sqlite3, python-telegram-bot and gspread library
Counter-hack helps to count money (or something else in future) getting numbers and categories from a user.
-
Sqlite3 database is used for data storage.
-
The bot, receiving a request from the user, processes it using the python-telegram-bot library, which interacts with the Telegram bot API.
-
gspread is a Python API for Google Sheets.
- Open Google Sheets template
- Click 'Share access' for editing with
telegram-bot-service@counter-bot-361806.iam.gserviceaccount.com
- Copy URL of a page and send it to Counter-hack bot
- All packages are located in requirements.txt
- Environmental variables are located in .env (you must change example.env file)
- Python 3.8
- sqlite3
- python-telegram-bot
- gspread
python3 -m venv env
. env/bin/activate
pip install -r requirements.txt
Install python-telegram-bot library
pip install python-telegram-bot --upgrade
Then install ...
pip install telegram
Then library for getting environmental variables:
pip install python-dotenv
Install a gspread library (a Python API for Google Sheets)
pip install gspread
Project is in progress
- Adding new languages
- Adding feature for an admin to get more statistic information
- Bot will create its own table with all values, user need only click start, pass authentication and choose a template
- Replace polling with webhook
- Check if the name of a sheet is equal to a month and create a new one if not