Supported editions for this feature: Frontline Standard; Enterprise Standard and Enterprise Plus; Education Standard and Education Plus; Enterprise Essentials Plus. Compare your edition
Google Workspace gives you several ways to search and export your Gmail logs to create email reports:
- BigQuery reporting: Best for custom reports for large organizations
- Email Log Search: Best for basic queries using pre-defined reports
- Reports API: Best for custom reports
BigQuery reporting
For customizable, scalable reports for your enterprise or large organization, we recommend BigQuery. BigQuery is Google's managed analytics data warehouse.
With BigQuery, you can:
- Create custom Gmail reports.
- Create reports that combine Gmail data with data from other sources or apps.
- Keep and analyze Gmail data in BigQuery for as long as you need. The Admin console keeps Gmail data for only 30 days.
For example, you can create custom BigQuery reports to:
- Identify which rule quarantined a message.
- Track the number of distinct messages sent to a specified recipient.
- Review Gmail activity by combining Gmail data with organization directory data.
Note: You can also use BigQuery to analyze data from other Google Workspace apps and features. Learn more about other Google Workspace reporting logs with BigQuery.
Next steps
To get started with BigQuery for Gmail reporting:
- Set up Gmail logs in BigQuery
- Try some example queries for Gmail logs
- Review the schema for Gmail logs in BigQuery
- Learn how to analyze BigQuery data in Sheets
Other Gmail reporting options
Email Log Search
Use the pre-defined reports in Email Log Search in the Admin console to review mail delivery logs. Email Log Search keeps Gmail data for 30 days.
For example, you can use Email Log Search to:
- Find missing messages.
- Check the status of messages after delivery.
- Determine message IP addresses.
- Troubleshoot how policies affect mail flow.
Learn more about Email Log Search and supported reports.
Reports API
Use the Google Workspace Reports API to create these types of custom Gmail reports:
For example, you can use API reports to identify:
- The last time user accounts were accessed.
- How many emails are marked as spam, per user.
- Number of active user Gmail accounts.
Get started with the Reports API.