Gmail Toolkit
The Gmail toolkit enables your AI agents to send emails, read messages, and manage Gmail accounts through the Gmail API. This integration is perfect for automated email workflows, customer support, and notification systems.Overview
Category: CommunicationSetup Complexity: Medium
Authentication: OAuth 2.0
Provider: Google Workspace
Available Tools
Email Management
- Send Email - Compose and send emails with attachments
- Read Email - Retrieve and read email messages
- Search Emails - Find emails using Gmail search syntax
- Reply to Email - Send replies to existing conversations
- Forward Email - Forward messages to other recipients
Label and Folder Management
- List Labels - Get all available labels and folders
- Create Label - Create new custom labels
- Apply Labels - Add labels to specific emails
- Remove Labels - Remove labels from emails
Contact Management
- List Contacts - Access Gmail contacts
- Search Contacts - Find specific contacts
Setup Instructions
Cloud Customers (Odin Hosted)
No setup required! Gmail toolkit is enabled by default for all cloud customers. Users can connect their Gmail accounts directly:- Connect Gmail Account
- Users can connect their Gmail accounts directly from their agent settings
- OAuth flow uses Odin’s pre-configured Google app
- No additional setup or credentials needed
On-Premise Customers (Self-Hosted)
If you’re running Odin on your own infrastructure, you’ll need to set up your own OAuth app:Prerequisites
- Google Cloud Console account
- Gmail account with API access
- Odin AI Super Admin access
Step 1: Google Cloud Console Setup
-
Go to Google Cloud Console
- Visit console.cloud.google.com
- Create a new project or select existing one
-
Enable Gmail API
- Navigate to “APIs & Services” > “Library”
- Search for “Gmail API”
- Click “Enable”
-
Create OAuth Credentials
- Go to “APIs & Services” > “Credentials”
- Click “Create Credentials” > “OAuth 2.0 Client ID”
- Choose “Web application” as application type
- Add authorized redirect URI:
https://your-odin-domain.com/user/integrations/gmail/oauth/callback
-
Configure OAuth Consent Screen
- Go to “APIs & Services” > “OAuth consent screen”
- Choose “External” user type
- Fill in required app information
- Add Gmail API scopes:
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/gmail.send
https://www.googleapis.com/auth/gmail.compose
https://www.googleapis.com/auth/gmail.modify
Step 2: Get Credentials
-
Copy Client ID and Secret
- From the OAuth 2.0 Client ID page
- Copy the Client ID and Client Secret
-
Note the Redirect URI
- Ensure it matches your Odin installation URL
Step 3: Configure in Odin
-
Access Super Admin Panel
- Log in to your Odin instance as Super Admin
- Navigate to Super Admin > Toolkits
-
Add Gmail Configuration
- Find Gmail in the toolkit list
- Enter the following credentials:
- Google Client ID: Your OAuth Client ID
- Google Client Secret: Your OAuth Client Secret
- Google Redirect URI: Your configured redirect URI
-
Save Configuration
- Click “Save” to store the configuration
Best Practices
Security
- Use minimal required scopes
- Regularly rotate OAuth credentials
- Monitor API usage and access logs
- Implement proper error handling
Performance
- Use batch operations when possible
- Implement rate limiting to respect Gmail API limits
- Cache frequently accessed data
- Use appropriate search queries to minimize API calls
User Experience
- Provide clear error messages
- Implement retry mechanisms for failed operations
- Use proper email formatting (HTML vs plain text)
- Respect user’s email preferences
Rate Limits
Gmail API has the following rate limits:- 1 billion quota units per day
- 250 quota units per user per 100 seconds
- 1 quota unit per request (most operations)
Related Toolkits
- Google Calendar - Manage calendar events and scheduling
- Google Drive - Access and manage files
- Google Docs - Create and edit documents
- Google Sheets - Work with spreadsheets
Google Workspace Setup
Learn how to set up multiple Google services with shared OAuth