Gmail AI Threat Scanner Uses AI to Flag Phishing Anomalies
Summary
Gmail AI Threat Scanner is a lightweight Google Apps Script add-on for personal Gmail accounts. It extracts email metadata, headers, subject, sender, and body content, then sends that information to a low-latency AI model through an API for real-time anomaly analysis. A time-driven trigger can scan new unread messages every minute and apply one of three Gmail labels: AI-Safe, AI-Suspicious, or AI-Malicious. When a user opens a message, a contextual sidebar displays the verdict, risk score, and the specific red flags identified by the analysis. The sidebar also includes a “Mark as False Positive” control so users can manually correct a misclassification. The project runs in the user’s own Apps Script project with the user’s API key and does not require an external server or data store. Setup requires declaring OAuth scopes, storing an API credential such as a Gemini key in Script Properties, configuring the minute-based trigger, and installing the Gmail add-on through a test deployment. The repository warns that the tool is intended for individual Gmail use and is not designed for enterprise deployment.