Last run: never
Gmail i
Run Log
Settings
Setup Guide — First-Time Google Cloud Setup
One-time setup. Takes about 10 minutes. You only need a Google account — no Microsoft or Azure setup required.

Step 1 — Create a Google Cloud project

  1. Go to console.cloud.google.com and sign in with your Google account.
  2. Click the project selector at the top and choose New Project.
  3. Name it TPG Compliance Tool and click Create.
  4. Go to APIs & Services → Library. Search Gmail API and click Enable.

Step 2 — OAuth consent screen

  1. Go to APIs & Services → OAuth consent screen.
  2. User Type: choose Internal if you have Google Workspace, otherwise External.
  3. App name: TPG Vehicle Compliance Tool. Fill in your email as support email. Click Save and Continue.
  4. On the Scopes page click Add or remove scopes. Add:
    https://www.googleapis.com/auth/gmail.modify (read & manage emails — covers marking as read and applying labels)
    https://www.googleapis.com/auth/gmail.send
  5. Click Save and Continue. If External: add your Gmail address as a test user.

Step 3 — Create OAuth credentials

  1. Go to APIs & Services → Credentials → Create Credentials → OAuth client ID.
  2. Application type: Web application.
  3. Authorised JavaScript origins: add the domain where you open this HTML file.
  4. Click Create. Copy the Client ID (ends in .apps.googleusercontent.com).
  5. Paste it into Settings → Google Client ID above and click Save Settings.

Step 4 — Connect and run

  1. Go to the Dashboard and click Connect Gmail. Sign in and approve the requested permissions — this only needs to be done once.
  2. After the first sign-in the tool stays connected for up to 1 hour. On subsequent visits it will attempt to reconnect automatically — you only need to click Connect Gmail again if your Google browser session has fully expired.
  3. Click Run. The tool reads your Gmail inbox, updates all charts, marks processed emails as read, and moves them to the TPG Compliance Gmail label automatically.
  4. Existing users: if you set up this tool previously, click Connect Gmail once more to grant the updated gmail.modify permission (replaces gmail.readonly).
Important: All data is stored in this browser only. Export a backup regularly. Clearing browser data will delete all records.
Advanced — Email Field Map (adjust if parser misses fields)

The tool parses inspection emails by matching label patterns to internal field names. If your emails use different labels, edit the FIELD_MAP object near the top of this file's <script> block.

Any check field whose value is not in DEFECT_STATUSES_OK (satisfactory, available, yes, ok, good, pass, n/a) is flagged as a defect.

Data — Backup & Export

All data lives in your browser. Export a backup regularly — we recommend weekly.

Defect Management

Track and resolve vehicle defects. Amber = flagged in inspection. Mark complete once the issue is resolved. Open defects are automatically escalated to the manager email on each Run.