Secure Gmail for AI Agents
Gmail's OAuth scopes are all-or-nothing: gmail.modify grants full read, write, send, and delete. PortEden sits between your AI agent and the Gmail API, enforcing the granular rules that Google doesn't provide.
Secure Gmail CLI
PortEden's Secure Gmail CLI is a command-line tool that sits between AI agents and the Gmail API. Install it in minutes, define your security rules, and every Gmail request from any AI agent gets filtered automatically. No code changes needed on the agent side.
The Problem
Giving AI agents direct access to your data is risky. Here's what can go wrong.
Inbox Deletion via gmail.modify
The gmail.modify scope lets agents trash and permanently delete messages. A single misconfigured loop can wipe years of email in seconds.
Prompt Injection via Email Content
Attackers embed hidden instructions in email HTML that AI agents parse and execute, hijacking them to forward data or send unintended replies.
OAuth Token Exposure
AI agents hold your raw Google OAuth refresh token, and if the agent environment is compromised, attackers get persistent access to your entire Gmail account.
How PortEden Protects You
Six layers of security between AI agents and your data.
Visibility Controls
Choose what agents see: full content, headers only, or redacted versions with HTML stripped to neutralize prompt injection.
Action Limits
Restrict agents to read-only, draft-only, or full write access so they can never send or delete without permission.
Contact Rules
Block agents from seeing emails involving specific people or domains to keep sensitive correspondence invisible to AI.
Time Windows
Limit access to recent emails only with boundaries like 'last 7 days' or 'last 30 days' per agent.
Get Started in 3 Steps
Install the CLI
Install PortEden CLI and connect your Gmail account via secure Google OAuth.
Set Your Rules
Configure visibility controls, contact rules, action limits, and time windows per agent.
Connect Your Agent
Point your AI agent to PortEden instead of the Gmail API and every request is filtered with full audit logging.
Without vs. With PortEden
Without PortEden
- gmail.modify scope grants full read/write/send/delete with no middle ground
- Prompt injection via HTML email can hijack agent behavior
- Raw OAuth refresh token stored in agent's environment
- No audit trail of which emails the agent accessed
- Revoking access means disconnecting the entire Google integration
With PortEden
- Granular read-only, draft-only, or write access per agent
- HTML stripping and redaction neutralize prompt injection
- OAuth token stays in PortEden. Agents never see it
- Full audit log: which emails accessed, what was returned, what was blocked
- One-click revocation per agent, per provider, or globally