Switch to English?
Yes
Переключитись на українську?
Так
Переключиться на русскую?
Да
Przełączyć się na polską?
Tak
# Telegram Bot for Document Flow Automation (Invoices and Acts)

## Project Overview

This Telegram bot is designed for **quick generation of invoices (Invoices) and acts of completed work (Acts) in XLSX and PDF formats** based on data entered by the user through a dialogue.

The project demonstrates skills in developing functional **Telegram bots** using the asynchronous framework `aiogram` and practical work with **MS Excel** files for generating official financial documents.

---

## Key Features

* **Dialogue Interaction (FSM):** Step-by-step data collection (company name, invoice number/date, list of services, quantity, price) using **FSM (Finite State Machine)** in `aiogram` for a structured user experience.
* **Document Generation:** Using the `openpyxl` library to fill template XLSX files with invoices and acts.
* **PDF Conversion:** Automatic conversion of created XLSX files to PDF using an external tool (`libreoffice` via `subprocess`).
* **Flexibility:** Support for adding multiple service items in one document.
* **Financial Functions:** Automatic calculation of the total amount and output of the amount in words in Ukrainian (`num2words`).

---

## Technologies Used

| Category | Technology | Description |
| :--- | :--- | :--- |
| **Main Language** | Python | |
| **Bot Framework** | `aiogram` (v3+) | Asynchronous framework for Telegram bots. |
| **State** | FSMContext / MemoryStorage | Managing user sessions. |
| **Excel Handling** | `openpyxl` | Reading and writing data to template XLSX files. |
| **Configuration** | `python-dotenv` | Hiding confidential data (API token). |
| **System Calls** | `subprocess` + `libreoffice` | Document conversion. |
Work details
Added 15 November 2025
122 views
Freelancer
Oleksii Zorkin
Ukraine Kyiv
No reviews

Available for hire Available for hire
On the service 7 years