Telegram to Google Drive Sync

An asynchronous Python automation script engineered to act as a bridge between secure messaging and permanent cloud storage. It silently extracts PDF documents from a specific Telegram channel and securely backs them up to a Google Drive folder without manual intervention.

Asynchronous Operations & Smart Filtering

Built with Telethon and asyncio, the bot achieves high-throughput Telegram message parsing and concurrent media downloading. It employs Smart Filtering to automatically scan channel history and strictly target application/pdf MIME types, ensuring bandwidth isn't wasted on irrelevant media.

Robust Cloud Streaming

Files are uploaded to Google Drive using 2MB chunked resumable streams via the Google API, making it highly stable for large technical documents. The CLI features custom visual progress bars tracking both the Telegram download phase and the Google Drive upload phase in real-time.

Zero Storage Footprint

Designed to be lightweight and run on resource-constrained environments (like a Raspberry Pi or a low-tier VPS), the script automatically deletes the local copy of the PDF immediately after a successful upload to Drive is verified by the API.