Inspiration
The younger generation today is often new to traditional emails and more accustomed to instant messaging platforms like Telegram or standard text messages for communicating event updates and important information. This creates a challenge for organizations and individuals who still rely on formal email communication. To address this, we aim to bridge the gap by converting emails into easy-to-read text formats and, conversely, transforming text messages into proper email formats for sending. This approach not only makes communication more accessible and engaging for the younger generation but also ensures that the older generation, who are more familiar with formal email etiquette, can continue to receive messages in the format they expect.
What it does
TeleMail seamlessly connects with both Gmail and Outlook through IMAP and SMTP, enabling smooth two‑way email communication. At its core, it integrates with a configurable LLM API endpoint, allowing flexibility to work with any AI provider for processing and summarization. A fully featured Telegram bot handles commands and messages, acting as the user’s main interface for quick interactions. Security is built in from the start, with email verification using time‑limited codes to ensure only authorized accounts are linked. All user data and processed messages are stored in a lightweight SQLite database for reliability and portability. Finally, TeleMail transforms lengthy, formal emails into concise, text‑message‑style summaries, making them quick to read and easy to act on.
How we built it
- Backend: Python with Fast API for handling API requests, IMAP/SMTP email operations, and Telegram bot interactions.
- LLM Processing: Integrated a configurable LLM API endpoint, allowing flexibility to switch between providers without changing core logic.
- Telegram Bot: Built using python-telegram-bot library with command handlers for registration, linking email accounts, and retrieving summaries.
- Database: SQLite for lightweight, portable storage of user credentials (securely hashed), verification codes, and processed message logs.
- Security: Implemented email verification with time-limited codes to ensure only authorized users can link accounts.
Challenges we ran into
- Email Parsing: Handling different email formats (HTML, plain text, multi-part) and ensuring clean, concise summaries.
- Security & Privacy: Safely storing credentials and ensuring no sensitive data is exposed during processing.
- Telegram API Rate Limits: Managing message flow to avoid hitting limits while still delivering near real-time updates.
- LLM Prompt Engineering: Crafting prompts that consistently produce concise, readable summaries without losing important details.
- Cross-Platform Testing: Ensuring consistent behavior across Gmail, Outlook, and different Telegram clients
Accomplishments that we're proud of
- Successfully built a fully functional bridge between email and instant messaging in under the hackathon timeframe.
- Designed a modular architecture that allows swapping LLM providers without touching the main codebase.
- Achieved clean, human-friendly summaries that preserve the tone and intent of the original email.
- Created a secure verification flow that balances usability with strong authentication.
What we learned
- The importance of clear data flow design when integrating multiple APIs (email, LLM, Telegram).
- How prompt engineering can drastically impact the quality of AI-generated summaries.
- The value of Dockerized development for reproducibility and collaboration.
- That bridging generational communication styles requires both technical and UX considerations.
What's next for TeleMail
- Multi-language support so summaries and email conversions work globally.
- Rich media handling to include attachments, images, and inline previews in Telegram.
- Advanced filtering & prioritization so users can choose which emails get summarized.
- Analytics dashboard for organizations to track communication reach and engagement.
- Mobile app integration for push notifications and offline access


Log in or sign up for Devpost to join the conversation.