An open API service indexing awesome lists of open source software.

https://github.com/feliphemp/yana-telegrambot

Yana is a lightweight and stylish Telegram bot that fetches credit card invoice data from a Google Sheets document and displays it in a modern, emoji-rich format.
https://github.com/feliphemp/yana-telegrambot

asyncio credit-card csv-parser dotenv expenses-tracker fastapi finance-bot google-sheets httpx open-source personal-finance python render-deploy render-deployment serverless telegram telegram-bot webhook

Last synced: about 1 month ago
JSON representation

Yana is a lightweight and stylish Telegram bot that fetches credit card invoice data from a Google Sheets document and displays it in a modern, emoji-rich format.

Awesome Lists containing this project

README

          

# Yana πŸ§ΎπŸ“±


Yana Logo


Better Stack Badge
Ask DeepWiki



**Yana** is a lightweight and stylish Telegram bot that fetches credit card invoice data from a Google Sheets document and displays it in a modern, emoji-rich format. It’s perfect for keeping track of your monthly expenses directly through Telegram! πŸ’ΈπŸ“Š

---

## ✨ Features

- πŸ“₯ Fetches invoice values from multiple cards (e.g., Nubank, Inter, Santander)
- πŸ’¬ Beautifully formatted response with:
- Per-card amount and progress bar
- Due dates and payment status
- Monthly totals
- 🎨 Color and emoji styling per card
- ☁️ Data sourced from a public Google Sheets CSV link
- 🌐 Built with FastAPI and deployable to Render (or any cloud)

---

## πŸ€– Available Commands

| Command | Description |
|-------------|---------------------------------------------|
| `/faturas` | Returns the monthly invoice summary |
| any message | The bot gently replies asking for commands |

---

## 🧰 Requirements

- Python 3.10+
- Telegram Bot Token (via [@BotFather](https://t.me/BotFather))
- Public link to a Google Sheets CSV export

### πŸ“¦ Install Python dependencies

```bash
pip install -r requirements.txt
```

Your `requirements.txt` should include:

```
python-dotenv
fastapi
uvicorn
httpx
pydantic
```

---

## πŸ” Environment Variables

Create a `.env` file at the root of the project:

```env
BOT_USERNAME=yourbotusername
BOT_TOKEN=your_telegram_bot_token
CSV_URL=public_link_to_your_google_sheets_csv
SHEET_LINK=https://your_shared_sheet_link
RENDER_URL=optional_url_for_render_deployment
AUTHORIZED_CHAT_IDS=your_personal_chat_id,another_one,group_chat_id,another_one
```

> ⚠️ **Never commit your `.env` file to version control!**
> Make sure to add `.env` to `.gitignore`.

---

## πŸš€ Running the Bot

### πŸ”„ Development mode

To run locally with auto-reload:

```bash
uvicorn main:app --reload
```

You can use a tool like [ngrok](https://ngrok.com/) to test Telegram webhook locally.

### ☁️ Deployment to Render

Create a web service using `main:app` as the entry point. The `RENDER_URL` is used to ping itself periodically to prevent free-tier sleeping.

---

## πŸ“Έ Sample Output

Here’s how the bot outputs information in a Telegram chat:

---

## πŸ” Security Notes

- πŸ”‘ Keep your bot token and links secure.
- ❌ Never expose your `.env` or secrets publicly.
- βœ… Use environment variables for safe deployment.

---

## 🀝 Contributing

Contributions are welcome!
Bug reports, suggestions, and pull requests are appreciated. πŸ› οΈ
Let’s make this bot better together. πŸ’¬βœ¨

---

## πŸ‘¨β€πŸ’» Author

Made with ❀️ by [FelipheMP](https://github.com/FelipheMP)

---

## πŸ“„ License

GPL-3.0. See [LICENSE](./LICENSE) for more details.