Gmail Integration
Scan Gmail messages and attachments for policy violations.
Overview
The Gmail integration connects Aguardic to your Google Workspace email via OAuth. Aguardic monitors incoming and outgoing emails, evaluating message content and attachments against your policies and enforcing actions through Gmail labels and quarantine.
Setup
Connect via OAuth
Go to Integrations > Add Integration > Gmail in the Aguardic dashboard and click Connect. You'll be redirected to Google to authorize Aguardic with the required Gmail API permissions.
The Gmail integration requires Google Workspace (business) accounts. Personal Gmail accounts have limited API access.
Bind policies
After connecting, go to Policy Bindings and map your policies to the Gmail integration. You can create separate policies for inbound and outbound email.
Configure enforcement
Choose how Aguardic enforces policy results on Gmail:
How It Works
Email sent or received
Push notification
Fetch email data
Policy evaluation
Enforce policies
Aguardic automatically creates the "Aguardic Quarantine" and "Aguardic Violation" labels in your Gmail account when the first violation is detected.
What Gets Evaluated
Example Policies
Outbound PII Detection
Prevent sensitive personal data from being sent externally:
- Field:
body - Operator:
MATCHES - Value:
(\b\d{3}-\d{2}-\d{4}\b|\b\d{9}\b)(SSN patterns) - Severity: CRITICAL
Attachment Scanning
Block emails with potentially dangerous attachment types:
- Field:
attachments - Operator:
MATCHES - Value:
\.(exe|bat|cmd|ps1|vbs|js)$ - Severity: HIGH
Unauthorized External Communication
Flag emails sent to non-approved external domains:
- Field:
recipients - Operator:
NOT_IN - Value:
@yourcompany.com,@approved-vendor.com - Severity: MEDIUM
Next Steps
- Outlook Integration — Similar setup for Microsoft 365 email
- Your First Policy — Deep dive into policy creation