Skip to content

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

  1. Go to the Google Cloud Console
  2. Select or create a project
  3. Navigate to IAM & AdminService Accounts
  4. Click Create Service Account
  5. Provide a name and description
  6. Click Create and Continue
  7. Skip the optional permissions step
  8. Click Done

Step 2: Enable Domain-Wide Delegation

  1. In the Service Accounts list, click on your newly created service account
  2. Navigate to the Keys tab
  3. Click Add KeyCreate new key
  4. Select JSON format
  5. Click Create to download the key file
  6. Navigate to the Details tab
  7. Click Show Advanced Settings
  8. Check Enable Google Workspace Domain-wide Delegation
  9. Save the changes

Step 3: Configure API Access in Google Workspace

  1. Go to your Google Admin Console
  2. Navigate to SecurityAPI ControlsDomain-wide delegation
  3. Click Add new
  4. Enter the Client ID from your service account
  5. Add the following OAuth scopes:
    https://www.googleapis.com/auth/admin.reports.audit.readonly
    https://www.googleapis.com/auth/admin.reports.usage.readonly
  6. Click Authorize

Step 4: Enable the Reports API

  1. In the Google Cloud Console, navigate to APIs & ServicesLibrary
  2. Search for "Admin SDK API"
  3. Click on it and select Enable

Step 5: Configure the Source in Datable

  1. Navigate to the Sources page in Datable
  2. Select Google Workspace Reports from the available sources
  3. 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
  4. 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.