Overview
Connect Gmail to automatically track every client email, analyze sentiment with AI, and feed data to Lars for intelligent recommendations. All emails are processed for sentiment, engagement patterns, and relationship health.Features
Gmail Integration
Automatic email tracking with sentiment analysis and engagement metrics
Contact Discovery
Automatic client and stakeholder identification from email interactions
Email Analytics
Track email engagement, response rates, and communication patterns
Real-time Sync
Continuous monitoring with 15-30 minute sync intervals
Setting Up Google Integration
Prerequisites
Before connecting Google Workspace:- Google Workspace admin access (or personal Gmail account)
- Permission to grant third-party app access
- Understanding of which email accounts to sync
Connection Process
1
Start OAuth Flow
Navigate to
/api/integrations/google/start or click “Connect Google” in your integrations dashboard2
Grant Permissions
Sign in to your Google account and authorize Stanna to access:
- Gmail messages (read-only)
- Contact information
- Calendar events (if calendar integration is enabled)
3
Verify Connection
Check connection status at
/api/integrations/google/status- Shows last sync time
- Displays token expiration
- Confirms active sync status
4
Initial Sync
Trigger first sync with
POST /api/integrations/google/sync- Imports up to 2 years of historical emails
- Identifies clients by domain matching
- Begins sentiment analysis processing
Data Sync & Processing
What Data is Imported
Email Messages:- Subject lines and content for sentiment analysis
- Sender and recipient information
- Timestamps and thread relationships
- Email engagement (opens, clicks if available)
- Email addresses and display names
- Automatic stakeholder identification
- Domain-based client mapping
Sync Frequency
- Real-time: Critical interactions sync within minutes
- Regular Sync: Every 15-30 minutes during business hours
- Manual Sync: Available via
POST /api/integrations/google/sync - Batch Processing: Background processing for large volumes
Historical Data Import
Initial setup includes:- Backfill Process:
POST /api/integrations/google/backfill - Timeframe: Default 2 years (configurable)
- Batch Processing: Handles large email volumes without timeout
- Progress Tracking: Monitor import status in real-time
Email Analytics & Insights
Sentiment Analysis
Stanna analyzes email content to determine relationship health:- Positive sentiment: Friendly, collaborative language
- Neutral sentiment: Transactional, informational exchanges
- Negative sentiment: Complaints, issues, frustration indicators
Engagement Tracking
Monitor email interaction patterns:- Response rates: How often clients reply to your emails
- Response time: How quickly clients respond
- Email frequency: Communication cadence with each client
- Engagement trends: Changes in communication patterns over time
Client Health Impact
Email data directly influences client health scores:- Recent positive interactions boost scores
- Lack of responses may lower scores
- Issue-related emails trigger attention flags
- Communication frequency affects relationship strength metrics
API Endpoints
Core Integration Management
Data Processing
Troubleshooting
Integration shows as disconnected
Integration shows as disconnected
Common Causes:
- OAuth token expired (tokens expire every 6 months)
- Google account password changed
- 2FA settings modified
- Gmail API quotas exceeded
- Visit
/api/integrations/google/startto re-authenticate - Verify Google account is accessible
- Check for any recent security changes
- Contact support if quota issues persist
Emails not appearing in Stanna
Emails not appearing in Stanna
Troubleshooting Steps:
- Check last sync time in integration status
- Verify emails exist in Gmail (not deleted/archived)
- Confirm client domains are properly configured
- Trigger manual sync and monitor for errors
- Emails must contain recognizable client domains
- System needs read access to the specific Gmail labels
- Large email volumes may take time to process
Sentiment scores seem incorrect
Sentiment scores seem incorrect
Understanding Sentiment Analysis:
- AI analyzes email content for tone and context
- Scores improve with more data over time
- Manual attribution can override automated scoring
- Use
POST /api/clients/:id/attributeto add context - Review email content for ambiguous language
- Allow 1-2 weeks for AI model improvements
- Contact support for persistent inaccuracies
Best Practices
Clean Email Habits
Use clear, professional communication for better sentiment analysis accuracy
Domain Management
Ensure client domains are consistent across all systems for proper matching
Regular Monitoring
Check sync status weekly to catch any connection issues early
Data Privacy
Review what data is synced and ensure compliance with your privacy policies
Security & Privacy
Data Access
- Read-only access: Stanna never sends emails or modifies Gmail data
- Selective permissions: Only reads necessary email data
- Secure tokens: OAuth tokens encrypted and securely stored
Privacy Compliance
- GDPR compliant: Data processing aligned with privacy regulations
- Data retention: Configurable data retention periods
- Right to deletion: Complete data removal available on request
Audit Trail
- All email access logged with timestamps
- Integration activity tracked in admin logs
- Sync status and error reporting for transparency
Need help with setup? Contact support through Settings or email support@gostanna.com for assistance.