Email Purge Assistant
Built with Next.js
This project provides a simple tool that loads in emails from your Gmail account and finds sets of emails that are using up a lot of space. This should allow users to find emails to delete to clear up storage space.
To start the application locally, copy the file .env.local.example
to a new file .env
. Then add your Google application's Oauth credentials to the .env
file. Instructions for generating new Oauth credentials are in the next section.
Then run the following commands to start the project:
npm install
npm run dev
You should now be able to access the application at http://localhost:3000.
To create new Oauth credentials, follow these steps:
- Log into https://console.cloud.google.com/
- Create a new Project and make sure you select it in the page header.
- Search for "Gmail API" and select the API Marketplace option.
- Click "Enable API". If you're not redirected, click "Manage" on that page or go directly to here.
- Navigate to "Oauth Consent Screen" on the left. Choose "External" as the application type unless you know otherwise.
- Fill out the general information as necessary.
- On the Scopes section, add these scopes:
-
- gmail.readonly
-
- userinfo.email
-
- userinfo.profile
- On the Test User section, add your own email.
- Navigate to the credentials section and select "Create Credentials". Select the type of "Oauth Client ID". In the next form, choose the following options:
- Application Type : Web Application
- Authorized Redirect URIs: http://localhost:3000/api/auth/callback/google
- Authorized Javascript Origins: http://localhost:3000