An AI-powered Chrome Extension integrated with Spring Boot backend that intelligently generates professional email replies directly inside Gmail.
The project combines Natural Language Generation (via Gemini API), Java Spring Boot REST API, and a custom Gmail-integrated frontend to create a seamless smart email assistant experience.
- 🤖 Auto-generates context-aware replies based on incoming emails
- 🧠 Supports tone customization (Professional, Friendly, Casual)
- 💬 Integrates directly into Gmail’s compose window
- ⚙️ Real-time backend connection with Spring Boot REST API
- 🔒 Runs locally with secure
localhost:8080API calls - 🧩 Modern UI with Gmail-themed design for natural blending
| Layer | Technology |
|---|---|
| Backend | Java Spring Boot |
| Frontend | HTML, CSS, JavaScript |
| Extension | Chrome Manifest V3 |
| API | Gemini API (for email text generation) |
| Tools | IntelliJ IDEA, Postman, GitHub |
| Hosting | Localhost (Port 8080) |
-
Extension Injection
- The Chrome extension detects Gmail’s compose window using a
MutationObserver. - It automatically adds the “AI Reply” button and tone selector dropdown beside the send button.
- The Chrome extension detects Gmail’s compose window using a
-
Email Content Extraction
- When the user clicks “AI Reply”, the extension grabs the email thread content using DOM selectors.
-
Backend Communication
- The content and tone are sent to the Spring Boot backend via a POST request to
http://localhost:8080/api/email/generate.
- The content and tone are sent to the Spring Boot backend via a POST request to
-
Gemini API Integration
- The backend processes the text and calls the Gemini API to generate a meaningful, tone-specific reply.
-
Smart Reply Insertion
- The generated reply is automatically inserted into Gmail’s compose box, ready to be sent.
- MutationObserver → Detects Gmail’s dynamic compose window.
- Manifest V3 → Defines permissions and scripts for Chrome extension.
- Fetch API (POST) → Sends email content and tone to backend.
- Spring Boot REST Controller → Handles
/api/email/generateendpoint. - Gemini API → Generates contextual and tone-adjusted replies.
cd backend
mvn spring-boot:run🌐 2. Load Extension
Open Chrome → chrome://extensions/
Turn on Developer Mode
Click Load Unpacked → Select your /extension folder
Open Gmail and click Compose
You’ll see your AI Reply button appear inside Gmail’s toolbar.
💡 Future Enhancements
🌍 Deploy backend on Render or AWS
🧍 Add user authentication (OAuth2 for Gmail)
📩 Enable email thread understanding for deeper context
💾 Store email histories and reply logs
👨💻 Author
Aryan Srivastava B.Tech CSE | Chandigarh University Role: Full Stack Developer & Chrome Extension Architect
📫 Email: software.aryann@gmail.com