Inspiration
Every morning I wake up check my Gmail inbox and spent so much time reading my emails (it got frustrating) I check all 4 again couple hours later. And again. And again. So I decided to create something that summarizes my emails for me.
What it does
Gmail Summarizer is an AI-powered desktop assistant built in Python that solves email fatigue by turning a cluttered inbox into an executive briefing. Utilizing the official Google Gmail API, the application securely pulls unread messages and passes the data to the Gemini API for advanced semantic analysis. It then clusters high-value messages into specific real-world pillars such as Academics (e.g., tuition bills or transfer updates), Extracurriculars (e.g., hackathon statuses), and Security Alerts. Gemini then summarizes all the emails recieved today in less than 100 words (which also optimizes token usage). This application helps the user catch anything important which otherwise would've been missed in a full email box. Users interact with the app via a custom graphical dashboard featuring real-time notification badges and an itemized sidebar for deep-dive tracking.
How we built it
The application is engineered entirely in Python, utilizing Object-Oriented Programming (OOP) principles. It integrates the official Google OAuth2 protocol to securely authenticate users and handle session tokens via environment-level secrets. To retrieve the raw data, I built a robust backend pipeline that fetches, throttles, and decodes complex base64 nested JSON payloads directly from the Gmail API. For the intelligence engine, I integrated the Google Gemini API (gemini-2.5-flash), applying strategic prompt engineering to accurately parse multi-variable context across separate email threads. The frontend layout was constructed using the Custom Tkinter library to deliver a sleek, modern desktop user experience.
Challenges we ran into
One of the main challenges was managing token usage and payload efficiency when dealing with massive blocks of raw email text dumped from a crowded inbox. Feeding completely unstructured text to an LLM can quickly scale up processing costs and lead to bloated, wordy summaries. I solved this by engineering strict prompt boundaries that forced Gemini to condense the entire daily overview into under 100 words—dramatically optimizing token usage while ensuring the briefing stayed punchy and readable. Another hurdle was handling Google OAuth authentication tokens securely without exposing keys in the public repository.
Accomplishments that we're proud of
I am incredibly proud of building a fully functional, end-to-end desktop pipeline that successfully bridges Google’s secure workspace infrastructure with their cutting-edge AI ecosystem.
What we learned
Building this project deepened my understanding of handling third-party API authentications securely and mapping out token management strategies for real-time applications.
What's next for Gmail Summarizer
The immediate next phase for Gmail Summarizer is moving it off the local desktop environment and deploying it natively on Google Cloud using Cloud Run and Cloud Scheduler to handle fully automated, scheduled daily briefings. Furthermore, I plan to leverage Gemini’s multimodal features to allow the app to scan, read, and pull dates directly from PDF invoices and flyer images attached to incoming emails, automatically dropping them into a visual calendar.
Built With
- api
- auth0
- customtkinter
- gemini
- gemini-api
- google-gmail-oauth
- oauth
- os
- python
Log in or sign up for Devpost to join the conversation.