Inspiration

With the rise of misinformation, phishing, and politically manipulative emails, it can be difficult for users to quickly determine whether the information in their inbox is trustworthy. We wanted to create a lightweight tool that integrates directly into Gmail and helps users critically evaluate suspicious claims without needing to manually fact-check everything themselves. Our goal was to make fact-checking fast, accessible, and conversational.

What it does

Erm... Actually! is a Chrome extension that analyzes Gmail emails using AI to identify false, misleading, or unverifiable claims. When detection is enabled, the extension injects a floating chatbot directly into the Gmail page that:

  • Breaks down questionable claims into easy-to-read bullet points
  • Highlights misinformation, scams, or manipulative language
  • Allows users to ask follow-up questions about the email
  • Maintains conversational context for deeper clarification
  • Prevents spam requests with built-in flood protection and cooldown logic

The extension only activates when a valid Gmail email is open, ensuring it stays lightweight and context-aware.

How we built it

We built the project using:

  • Chrome Extensions Manifest V3
  • Vanilla JavaScript
  • Gemini 2.5 Flash API
  • Chrome Storage API
  • Chrome Tabs & Scripting APIs

The extension works by reading the currently opened Gmail email from the DOM, sending the content to the Gemini API for analysis, and then rendering the response inside a custom floating chatbot UI injected into the page.

We also implemented:

  • URL validation to ensure detection only works on actual emails
  • Persistent toggle state using chrome.storage.local
  • Cooldown and duplicate-request protection
  • Secure rendering with textContent to avoid XSS risks
  • Context-aware follow-up conversations

Challenges we ran into

One of the biggest challenges was working with Gmail's constantly changing DOM structure. Extracting email content reliably required careful handling of Gmail-specific class names and page states.

We also ran into issues with:

  • Preventing duplicate API calls when users spammed the toggle
  • Maintaining chatbot state across popup opens/closes
  • Synchronizing extension state with the currently active Gmail tab
  • Designing a chatbot UI that felt integrated without disrupting the Gmail experience

Another challenge was balancing responsiveness with API usage limits, which led us to implement multiple layers of flood protection.

Accomplishments that we're proud of

We're proud that we created a fully functional AI-powered Gmail assistant that feels seamless and interactive rather than just a basic popup tool.

Some accomplishments we're especially happy with:

  • Real-time fact-checking directly inside Gmail
  • Smooth floating chatbot interface
  • Persistent extension state across sessions
  • Follow-up conversation support with contextual memory
  • Strong security practices like avoiding innerHTML
  • Clean UX with clear validation and cooldown feedback

We also built the entire project without any frameworks, which helped us better understand Chrome extension architecture and browser APIs.

What we learned

Through this project, we learned:

  • How Chrome Extensions Manifest V3 works
  • How to inject and manage dynamic UI elements in existing webpages
  • Best practices for browser extension security
  • How to manage asynchronous communication between popup scripts and content scripts
  • How to integrate AI APIs into real-time applications
  • The importance of handling edge cases and preventing duplicate requests

We also gained experience designing AI systems that are constrained and context-aware instead of allowing unrestricted responses.

What's next for Erm.. Actually

In the future, we want to expand Erm... Actually! beyond Gmail and improve both the AI analysis and user experience.

Some ideas we're exploring:

  • Support for Outlook and other email platforms
  • Better scam/phishing detection models
  • Source citations for fact-checking results
  • Conversation persistence after page refreshes
  • Multi-tab synchronization
  • Automatic detection of suspicious emails without manual toggling
  • Backend proxy support for improved API security
  • More advanced claim verification using external fact-checking databases

Ultimately, we want Erm... Actually! to become a reliable AI assistant that helps users navigate misinformation safely and confidently.

Built With

Share this project:

Updates