Google Workspace Reports
Datable integrates with Google Workspace Reports API to collect activity reports and usage data across your Google Workspace domain, including Gmail, Drive, Calendar, Meet, and other services.
How it works
The Google Workspace Reports integration uses the Reports API to collect activity data and usage metrics from your Google Workspace domain. This includes user activities, admin actions, login events, and service-specific events.
Prerequisites
- Google Workspace Super Admin access
- A Google Cloud Platform project
- Service account with domain-wide delegation
Setup Instructions
Step 1: Create a Service Account
- Go to the Google Cloud Console
- Select or create a project
- Navigate to IAM & Admin → Service Accounts
- Click Create Service Account
- Provide a name and description
- Click Create and Continue
- Skip the optional permissions step
- Click Done
Step 2: Enable Domain-Wide Delegation
- In the Service Accounts list, click on your newly created service account
- Navigate to the Keys tab
- Click Add Key → Create new key
- Select JSON format
- Click Create to download the key file
- Navigate to the Details tab
- Click Show Advanced Settings
- Check Enable Google Workspace Domain-wide Delegation
- Save the changes
Step 3: Configure API Access in Google Workspace
- Go to your Google Admin Console
- Navigate to Security → API Controls → Domain-wide delegation
- Click Add new
- Enter the Client ID from your service account
- Add the following OAuth scopes:
https://www.googleapis.com/auth/admin.reports.audit.readonly https://www.googleapis.com/auth/admin.reports.usage.readonly
- Click Authorize
Step 4: Enable the Reports API
- In the Google Cloud Console, navigate to APIs & Services → Library
- Search for "Admin SDK API"
- Click on it and select Enable
Step 5: Configure the Source in Datable
- Navigate to the Sources page in Datable
- Select Google Workspace Reports from the available sources
- Provide the following configuration:
- Source Name: A descriptive name for this source
- Service Account Key: Upload or paste the JSON key file
- Admin Email: Email of a Google Workspace admin account
- Domain: Your Google Workspace domain
- Click Save to create the source
Data Collected
The integration collects the following report types:
Activity Reports
- Login Events: User sign-ins, failed attempts, suspicious activities
- Admin Activities: User management, settings changes, security actions
- Drive Activities: File operations, sharing changes, external access
- Gmail Activities: Email sending patterns, security events
- Meet Activities: Meeting creation, participation, recording events
- Calendar Events: Calendar sharing, event changes
- Mobile Device: Device management activities
Usage Reports
- User Usage: Storage consumption, active users
- Customer Usage: Overall domain statistics
- Entity Usage: Organizational unit metrics
Configuration Options
Report Types
You can configure which report types to collect:
- Admin
- Calendar
- Drive
- Login
- Meet
- Mobile
- Token
- User Accounts
Historical Data
Configure how far back to collect historical data on initial setup (up to 180 days).
Polling Frequency
Set the frequency for collecting new reports (minimum 5 minutes).
Troubleshooting
No Data Appearing
- Verify the service account has domain-wide delegation enabled
- Ensure all required OAuth scopes are authorized
- Check that the Admin SDK API is enabled
- Confirm the admin email has Super Admin privileges
Authentication Errors
- Regenerate the service account key
- Re-authorize the OAuth scopes in Google Admin Console
- Verify the domain is correct
Missing Report Types
- Some report types require specific Google Workspace editions
- Ensure the service account has access to all required APIs
- Check if specific services are enabled for your domain
Security Considerations
- Store service account keys securely
- Use read-only OAuth scopes
- Regularly rotate service account keys
- Monitor API usage in Google Cloud Console
- Review domain-wide delegation permissions periodically
API Quotas and Limits
Google Workspace Reports API has the following limits:
- 5 queries per second per user
- Daily quota varies by Google Workspace edition
The integration handles these limits automatically with:
- Request throttling
- Exponential backoff
- Efficient batching
Data Retention
Google Workspace retains activity data for:
- Most activities: 6 months
- Login data: 6 months
- Admin activities: Indefinite
Support
For additional support with the Google Workspace Reports integration, please contact the Datable support team or refer to the Google Workspace Admin SDK documentation.