Skip to content

๐Ÿง  AI-powered email assistant that summarizes Gmail messages with smart insights, tone analysis, and action items. Built with Streamlit & Python.

Notifications You must be signed in to change notification settings

Sappy12dream/emailPro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ง Email Assistant โ€” Smart Summaries with AI

A Streamlit-based intelligent email assistant that connects to your Gmail inbox, fetches emails, and uses AI to summarize them โ€” highlighting key insights, tone, actions, and priorities.

โœจ Built for productivity. Read less, act faster.

๐Ÿ”— Live Demo | ๐Ÿ“– Documentation | ๐Ÿ› Report Bug

๐Ÿš€ Features

๐Ÿง  Smart Summaries

  • Extracts key insights from each email using LLM summarization
  • Highlights important actions, tone, and priority levels
  • Categorizes emails automatically for better organization

โš™๏ธ Configurable Fetch Settings

  • Filter by date range and read/unread status
  • Limit the number of emails fetched
  • Customizable search criteria

๐Ÿ” Secure Gmail Connection

  • Uses App Passwords for authentication (IMAP)
  • Your credentials are never stored
  • Session-based security

๐Ÿ–ฅ๏ธ Clean Streamlit UI

  • Step-by-step guided interface:
    1. Connect to Gmail
    2. Choose filters
    3. Fetch & summarize
    4. View insights instantly
  • Intuitive design with responsive layout

๐ŸŒ Try It Now!

๐ŸŽฏ Live Application: https://email-pro.streamlit.app/

No installation required - just visit the link and start using the app!


๐Ÿงฉ Tech Stack

Component Description
Frontend/UI Streamlit
Backend Logic Python 3.x
Email Fetching IMAP via imaplib
Parsing Python email library
Summarization Custom LLM-based summarizer
Logging logging module for debugging

๐Ÿ“‚ Project Structure

๐Ÿ“ง email-assistant/
โ”œโ”€โ”€ app.py                     # Main Streamlit app
โ”œโ”€โ”€ summarizer.py              # AI summarization logic
โ”œโ”€โ”€ utils.py                   # Helper utilities (cleaning, parsing, etc.)
โ”œโ”€โ”€ gmail_connect_ui.py        # Gmail login UI
โ”œโ”€โ”€ fetch_settings_ui.py       # Fetch filter settings
โ”œโ”€โ”€ display_emails_ui.py       # UI to show summarized emails
โ”œโ”€โ”€ requirements.txt           # Dependencies
โ”œโ”€โ”€ email_app.log              # (Generated) App logs
โ””โ”€โ”€ README.md                  # You're here!

๐Ÿง  How It Works

  1. Login โ€” Connect using your Gmail credentials (App Password)
  2. Filter โ€” Choose your fetch range, unread filter, and count
  3. Fetch โ€” The app retrieves emails via IMAP
  4. Summarize โ€” Each email's content is analyzed and summarized using AI
  5. Display โ€” Summaries with actions, tone, and priority appear beautifully in Streamlit

๐Ÿงฐ Setup & Run Locally

1๏ธโƒฃ Clone the repo

git clone https://github.com/yourusername/email-assistant.git
cd email-assistant

2๏ธโƒฃ Create a virtual environment

python -m venv venv
source venv/bin/activate   # (macOS/Linux)
venv\Scripts\activate      # (Windows)

3๏ธโƒฃ Install dependencies

pip install -r requirements.txt

4๏ธโƒฃ Set up environment variables (optional)

Create a .env file for API keys if using external LLM services:

OPENAI_API_KEY=your_api_key_here
# or other LLM provider credentials

5๏ธโƒฃ Run the app

streamlit run app.py

The app will open in your browser at http://localhost:8501


๐Ÿ”‘ Gmail Setup

  1. Enable IMAP in your Gmail settings:

    • Go to Settings โ†’ See all settings โ†’ Forwarding and POP/IMAP
    • Enable IMAP access
  2. Create an App Password:

    • Go to Google Account Security
    • Navigate to Security โ†’ 2-Step Verification โ†’ App passwords
    • Generate a new app password for "Mail"
  3. Use the App Password (not your Gmail login password) in the app

โš ๏ธ Important: Your credentials are only used in-session and are not stored anywhere.


๐Ÿ’ก Example Output

โšก Reminder: SDE2- UI at Increff
๐ŸŸข Normal Priority

From: Voila - your professional assistant <voila@alerts.cutshort.io>
Date: Oct 27, 2025

๐Ÿ“‹ Summary:
Ariba Khan invited Sapna Khatik to apply for the SDE II - UI role at Increff.
The email encourages Sapna to respond or track the application via links.

๐Ÿ’ฌ Tone: Neutral
๐Ÿ“ Category: action_required

โœ… Suggested Actions:
- Apply for the role
- Review similar job alerts

๐Ÿงช For Developers

You can easily extend the functionality:

  • summarizer.py โ†’ Replace or upgrade the LLM summarization model
  • display_emails_ui.py โ†’ Add pagination, filters, or search functionality
  • utils.py โ†’ Enhance content extraction or cleaning logic

๐Ÿ”ฎ Future Ideas:

  • โœ… Add OAuth-based Gmail login
  • ๐Ÿ“Š Export summaries to CSV/PDF
  • ๐Ÿงพ Smart daily digest email summaries
  • ๐Ÿง  Multi-account or team dashboard view
  • ๐Ÿ” Advanced search and filtering options
  • ๐Ÿ“ฑ Mobile-responsive design improvements
  • ๐Ÿค– Integration with other email providers (Outlook, Yahoo)

๐Ÿง‘โ€๐Ÿ’ป Contributing

Pull requests are welcome! If you'd like to add features or fix bugs:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Submit a PR with clear description

๐Ÿ›ก๏ธ License

MIT License ยฉ 2025 โ€” Developed by Sapna Singh Khatik


๐Ÿ“ž Support

If you encounter any issues or have questions:

  • Open an issue on GitHub
  • Check the logs in email_app.log
  • Review Gmail IMAP settings

โญ If you find this project helpful, please consider giving it a star!

About

๐Ÿง  AI-powered email assistant that summarizes Gmail messages with smart insights, tone analysis, and action items. Built with Streamlit & Python.

Topics

Resources

Stars

Watchers

Forks

Languages