Skip to main content

Overview

Google Suite integration provides access to Google’s productivity tools including Calendar, Gmail, Drive, and other services.

Supported Services

  • Gmail - Send, read, and manage emails
  • Google Calendar - Schedule events, check availability
  • Google Drive - Access and manage files
  • Google Search - Web search capabilities
  • Google Lens - Visual search and recognition

Setup

1. Create Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project
  3. Enable required APIs:
    • Gmail API
    • Google Calendar API
    • Google Drive API
  1. Go to “OAuth consent screen”
  2. Choose “External” user type
  3. Fill in application details
  4. Add scopes (see below)

3. Create OAuth Credentials

  1. Go to “Credentials”
  2. Click “Create Credentials” > “OAuth client ID”
  3. Application type: “Web application”
  4. Add authorized redirect URIs:
    https://your-domain.com/auth/google/callback
    
  5. Download credentials JSON

4. Configure Praxos

Add to .env:
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REDIRECT_URI=https://your-domain.com/auth/google/callback

OAuth Scopes

Required scopes:

Gmail

https://www.googleapis.com/auth/gmail.send
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/gmail.modify

Calendar

https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/calendar.events

Drive

https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file

User Authorization

Users must authorize Praxos to access their Google account:
  1. User: “Connect my Google Calendar”
  2. Praxos: Provides authorization URL
  3. User clicks URL and grants permissions
  4. Tokens stored securely for user
  5. Praxos: “Successfully connected to Google Calendar”

Features

Gmail

Send Emails
User: Send an email to john@example.com about the meeting
Praxos: What would you like the subject and content to be?
User: Subject: Tomorrow's Meeting, Content: [...]
Praxos: Email sent successfully!
Read Emails
User: What are my unread emails?
Praxos: You have 5 unread emails:
         1. John Doe - Re: Project Update
         2. Jane Smith - Q4 Planning
         [...]
Search Emails
User: Find emails from Sarah about "budget"
Praxos: Found 3 emails from Sarah containing "budget"...

Google Calendar

Schedule Events
User: Schedule a meeting with the team tomorrow at 2pm
Praxos: I'll schedule "Team Meeting" for tomorrow at 2:00 PM.
         Duration: 1 hour (default)
         [Confirm] [Change Time] [Cancel]
Check Schedule
User: What's on my calendar today?
Praxos: Today's schedule:
         • 9:00 AM - Daily Standup
         • 11:00 AM - Client Call
         • 2:00 PM - Team Meeting
         • 4:00 PM - 1-on-1 with Manager
Find Available Slots
User: When am I free for a 30-minute meeting this week?
Praxos: Available slots this week:
         • Today: 3:00 PM - 5:00 PM
         • Tomorrow: 10:00 AM - 12:00 PM, 3:30 PM - 5:00 PM
         • Wednesday: 9:00 AM - 11:00 AM

Google Drive

Search Files
User: Find my Q4 report PDF
Praxos: Found "Q4_Financial_Report.pdf"
         Last modified: Oct 5, 2024
         [Open] [Share] [Download]
Upload Files
User: [Sends file] Save this to my Drive
Praxos: Saved "presentation.pptx" to Google Drive
         Location: My Drive/Work/Presentations
         [View in Drive]
Share Files
User: Share the Q4 report with team@company.com
Praxos: Shared "Q4_Financial_Report.pdf" with team@company.com
         Access: Can view

Configuration

Environment Variables

# OAuth Credentials
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REDIRECT_URI=https://your-domain.com/auth/google/callback

# Optional
GOOGLE_API_KEY=your-api-key  # For services without OAuth

Token Management

  • Tokens stored per user in database
  • Automatic refresh when expired
  • Secure encryption at rest
  • Revocable by user

Troubleshooting

Authorization Fails

  • Check redirect URI matches exactly
  • Verify all required scopes are requested
  • Ensure OAuth consent screen is published

API Quota Exceeded

Google APIs have quotas:
  • Calendar: 1M requests/day
  • Gmail: 1B quota units/day
  • Drive: 20K requests/100 seconds
Solutions:
  • Implement caching
  • Batch operations
  • Request quota increase

Token Refresh Issues

  • Verify refresh token is valid
  • Check token hasn’t been revoked
  • Ensure OAuth client hasn’t changed

Security Best Practices

  • Use HTTPS for redirect URIs
  • Store tokens encrypted
  • Implement token rotation
  • Monitor suspicious activity
  • Provide token revocation

Rate Limiting

Praxos implements:
  • Exponential backoff
  • Request queuing
  • Per-user rate limiting
  • Quota monitoring

Next Steps