Skip to content

ParseBox is a Web application that allows users to log in with their Google account and parse the most recent emails from their Gmail inbox using the Gmail API. Built using GCP Console, FastAPI, Google OAuth2.

Notifications You must be signed in to change notification settings

Yash-Bandal/ParseBox-Email-Parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ParseBox

ParseBox is a Web application that allows users to log in with their Google account and parse the most recent emails from their Gmail inbox using the Gmail API. Built using GCP Console, FastAPI, Google OAuth2.

Features

  • Google OAuth2 login
  • Access Gmail inbox
  • Parse and display sender, subject, and date of recent emails
  • Logout functionality to clear session

Project Structure

app/
β”œβ”€β”€ auth.py              # Handles Google OAuth login & session
β”œβ”€β”€ gmail_reader.py      # Gmail API logic
β”œβ”€β”€ main.py              # FastAPI routes
└── templates/
    └── home.html        # HTML template for email table
credentials.json         # GCP OAuth credentials 
requirements.txt         # Python dependencies

Demo

  • Login β†’ Gmail API permission β†’ View recent emails in tabular format

Tech Stack

  • Cloud Platform: GCP Console
  • Backend: FastAPI
  • Frontend: HTML (Jinja2)
  • OAuth: Google OAuth 2.0
  • API: Gmail API

Setup Instructions

1. Clone the Repository

git clone https://github.com/Yash-Bandal/ParseBox-Email-Parser.git
cd app

2. Create & Activate Virtual Environment

python -m venv myvenv
Windows: myvenv\Scripts\activate
Mac/Linux: source myvenv/bin/activate  

3. Install Dependencies

pip install -r requirements.txt

4. Enable Gmail API in Google Cloud Console

  • Visit: https://console.cloud.google.com/
  • Create a new project
  • Go to APIs & Services > Library β†’ Enable Gmail API
  • Go to OAuth consent screen β†’ Fill required fields β†’ Set app as external
  • Go to Credentials β†’ Create OAuth client ID
    • App type: Web application
    • Add http://127.0.0.1:8000/callback as Authorized redirect URI
  • Download credentials.json and place in root directory

5. Run the App

uvicorn app.main:app --reload

Visit: http://127.0.0.1:8000


License

MIT Licence


Connect


A YB Productions original. πŸ’


About

ParseBox is a Web application that allows users to log in with their Google account and parse the most recent emails from their Gmail inbox using the Gmail API. Built using GCP Console, FastAPI, Google OAuth2.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published