Project Name:
Inbox Copilot – an AI-powered email assistant that monitors incoming messages, interprets content using custom GPT logic, and suggests smart, human-like replies in real-time.
Designed as a productivity tool for busy professionals, the app connects directly to Gmail, performs semantic analysis on new emails, and recommends high-quality, context-aware responses via a simple interface.
Tools Used
Replit: For file storage and triggering the workflow.
Google Gemini API: For AI-powered ad optimization suggestions and predictions.
Flow Overview
Manually replying to emails is time-consuming, repetitive, and mentally draining—especially when the messages follow common patterns (e.g., job inquiries, scheduling, follow-ups). I built a Python-based automation system using Gmail’s API and OpenAI’s LLMs. The system listens for incoming emails, parses them, and uses AI to suggest replies directly in the UI—ready to copy or tweak.
Key Features
OAuth2 integration with Gmail (handling scopes, credentials, token refresh)
Asynchronous email polling & monitoring
Gemini-powered email intent classification and response generation
Modular backend structure using Flask (or whatever framework you're using)
Configurable interface deployed on Replit
Challenges & Workarounds
Replit’s built-in AI credit limits forced me to modularize the AI layer and debug token exhaustion issues
Dealing with Gmail’s strict OAuth requirements and redirect URI handling on a cloud IDE like Replit
Designed the architecture to run continuously with minimal user input, simulating real-world usage
Impact
The tool could save an average user 1–2 hours/week by drafting replies automatically—especially useful for customer service, job hunting, or founders managing dozens of inbound emails.
Step 1: Setting the Foundation in Replit
I started with Replit because I wanted a browser-based dev environment that worked instantly.
I created a new Python project, and my file structure looked like this:
Step 2: Step 2: Connecting to Gmail (OAuth2)
To interact with Gmail, I needed to:
Set up a project in Google Cloud Console
Enable the Gmail API
Create OAuth 2.0 credentials
Add myself as a “test user”
This was the trickiest part — OAuth is never fun.
Step 3: Using AI to Analyze and Reply
For the AI part, I used Gemini’s API to:
Summarize the email content
Identify tone and intent
Generate a human-like reply
Final Result: Inbox Copilot
Now, when a new email arrives:
The assistant fetches it
Analyzes the content
Generates a reply instantly
All within a lightweight interface on Replit.
It’s not production-grade yet, but it’s a great proof of concept. And honestly it’s satisfying as hell to see it working.
What I Learned
OAuth and API scopes can be painful, but they’re not impossible
You don’t need to reinvent the wheel APIs are more powerful than we think
Fast prototyping with Replit can lead to real results
Thanks for reading
Send me a message if you want to test the assistant, collaborate.