A python telegram bot to help track daily expenses onto google sheet, hosted on Vercel using Flask.
Version 1 was hosted locally with a different version of python-telegram-bot
You can find the release notes over here.
- Access the bot on telegram
- Use the /start command and follow the instructions given.
- Remember to edit the Dropdownsheet on Google Sheet to get started. 
- Happy using!
- Fork the repo and run the code below to installed the required dependencies
pip install -r requirements.txt- Install ngrok
- Go to Google Cloud Platform
- Set up Google Sheet API, download service account key
- Retrieve Google Sheet API email
- Set up Firebase Realtime Database, download service account key
- Retrieve your firebase database url
- Set up telegram bot via BotFather
- Insert all of them into .env as follows, you can use py dotenv or set it as env variable in your venv
BOT_TOKEN=your_bot_token
DATABASE_URL=firebase_url
GOOGLE_API_EMAIL=google_api_email
FIREBASE_JSON=service_account_key
GOOGLE_JSON=service_account_key- Run ngrok
ngrok http 5000
- Copy the link, it should look something like this 'https://.ap.ngrok.io'
- Set up web hook by opening this link:
https://api.telegram.org/bot<bot_token>/setwebhook?url=https://<address>.ap.ngrok.io/webhook- You should see this:
{"ok":true,"result":true,"description":"Webhook was set"}- Proceed to project directory and run:
python3.9 test.py/start - Initialize and Configure Sheet
/config - Update Sheet Settings
/addentry - Add Expense Entry
/addtransport - Quick Add Transport Entry
/addothers - Quick Add Other Entry
/addincome - Add Income Entry
/retrievetransaction - Retrieve transaction from dates
/cancel - Cancel Conversation
/help - Show Help
If you want to contribute or have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue or work on issues that are currently open. Don't forget to give the project a ⭐! Thanks again!
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Bruce Wang: [email protected]
LinkedIn: https://www.linkedin.com/in/brucewzj/
Project Link: https://github.com/brucewzj99/tele-tracker