Skip to content

brucewzj99/tele-tracker-v2

Repository files navigation

Tele-Tracker Bot

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

Release Notes

You can find the release notes over here.

FAQ

You can find the FAQ over here.

Table of Contents

Getting Started (Users)

  1. Access the bot on telegram

  2. Use the /start command and follow the instructions given.

  3. Remember to edit the Dropdown sheet on Google Sheet to get started. image

  4. Happy using!

Getting Started (Developers)

Step 1

  • Fork the repo and run the code below to installed the required dependencies
pip install -r requirements.txt

Step 2

  • Go to Google Cloud Platform
  • Set up Google Sheet API, download service account key
  • Retrieve Google Sheet API email
  • Set up Firebase Firestore Database, download service account key
  • 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
  • You can use the same TOKEN for BOT_TOKEN & TEST_TOKEN but I recommend using two different bots for testing and production
  • I recommend having two different firebase databases for testing and production
BOT_TOKEN=your_bot_token
TEST_TOKEN=your_test_token
GOOGLE_API_EMAIL=google_api_email
FIREBASE_JSON=service_account_key
GOOGLE_JSON=service_account_key
MASTER_TELE_ID=your_telegram_id

Step 3

  • Proceed to project directory and run:
python3.9 dev_polling.py
OR
python3.9 dev_webhook.py

Usage

/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

/backlog - Add backdated transaction

/getdaytransaction - Retrieve transaction from dates

/getoverall - Retrieve overall transaction for a month

/cancel - Cancel Conversation

/help - Show Help

/notifyall - Send message to all users (requires your telegram id/only for admin)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Bruce Wang: hello@brucewzj.com

LinkedIn: https://www.linkedin.com/in/brucewzj/

Project Link: https://github.com/brucewzj99/tele-tracker-v2

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •