Gmail AI Threat Scanner
NOTE: This is best suited for personal or individual gmail instances ONLY and NOT for enterprise deployment.
A lightweight, zero-infra Gmail security extension built using Google Apps Script. It monitors incoming emails, extracts metadata, and runs real-time anomaly analysis using low-latency AI models via API.
It operates in two modes simultaneously:
Automated Background Scan: A time-driven trigger runs every minute to evaluate new unread emails and apply color-coded labels (AI-Safe, AI-Suspicious, AI-Malicious).
Interactive Sidebar Add-on: A contextual sidebar panel that opens when reading an email to show detailed risk scores, verdicts, specific red flags, and an interactive "Mark as False Positive" button to manually fix misclassifications.
The add-on extracts metadata from each email (sender, subject, headers, and body content) and sends it to an AI model via API for real-time anomaly analysis. Two things happen with the result:
This is a personal-inbox tool, not an enterprise deployment. It runs on your own Google Apps Script project, under your own API key, with no external server or data store involved.
Installation & Setup
Configure the Manifest (appsscript.json)
To allow the script to make outbound API calls, modify mailbox labels, and fetch local time zones, you must declare explicit OAuth scopes.
Add Your Engine Code (Main.gs)
Store Your API Credentials
How to get an API Key If you have a an API key for a GEMINI already, use it but otherwise follow below steps:
Automate Background Execution
To make the analysis function look for incoming emails automatically without needing to open the add-on UI manually:
Deployment & Verification
10 commits
JavaScript
100.0%
Gmail AI Threat Scanner
NOTE: This is best suited for personal or individual gmail instances ONLY and NOT for enterprise deployment.
A lightweight, zero-infra Gmail security extension built using Google Apps Script. It monitors incoming emails, extracts metadata, and runs real-time anomaly analysis using low-latency AI models via API.
It operates in two modes simultaneously:
Automated Background Scan: A time-driven trigger runs every minute to evaluate new unread emails and apply color-coded labels (AI-Safe, AI-Suspicious, AI-Malicious).
Interactive Sidebar Add-on: A contextual sidebar panel that opens when reading an email to show detailed risk scores, verdicts, specific red flags, and an interactive "Mark as False Positive" button to manually fix misclassifications.
The add-on extracts metadata from each email (sender, subject, headers, and body content) and sends it to an AI model via API for real-time anomaly analysis. Two things happen with the result:
This is a personal-inbox tool, not an enterprise deployment. It runs on your own Google Apps Script project, under your own API key, with no external server or data store involved.
Installation & Setup
Configure the Manifest (appsscript.json)
To allow the script to make outbound API calls, modify mailbox labels, and fetch local time zones, you must declare explicit OAuth scopes.
Add Your Engine Code (Main.gs)
Store Your API Credentials
How to get an API Key If you have a an API key for a GEMINI already, use it but otherwise follow below steps:
Automate Background Execution
To make the analysis function look for incoming emails automatically without needing to open the add-on UI manually:
Deployment & Verification
10 commits
JavaScript
100.0%