For the complete documentation index, see llms.txt. This page is also available as Markdown.

Google Agent

This page provides detailed configuration instructions for the Google Agent, which enables comprehensive integration with Google for GMail, Google Calendar, and Google Drive

Cover

Overview

  • Search and retrieve emails, calendar events, and Drive files from Google through Blockbrain

  • Compose, send, draft, read, and organize Gmail messages directly within Blockbrain

  • Create, read, update, and delete Google Calendar events, including availability and free/busy checks

  • Search, retrieve, and summarize Google Drive documents for reporting or AI analysis (read-only)

  • Automate email and calendar workflows using Google Workspace data

Cover

Prerequisites

  • Complete the general setup steps from the main AI Agents page

  • Ensure users have active Google Workspace (or Google) accounts with Gmail, Calendar, and Drive enabled

Google Cloud OAuth Configuration

Required APIs

In the Google Cloud Console, enable the following APIs for your project:

API
Used for

Gmail API

Email search, read, send, drafts, labels

Google Calendar API

Calendar and event management, free/busy

Google Drive API

File search and download (read-only)

Google Cloud OAuth Configuration

Recommended: use an "Internal" app (Google Workspace).

Several of the scopes the Google Agent uses are classified by Google as restricted (Gmail and Drive) or sensitive (Calendar). For an External app, these scopes trigger Google's OAuth verification and an annual, paid security assessment by a Google-approved third party (CASA); until verified, the app is also capped at 100 users for the entire lifetime of the project (this cap cannot be reset).

Apps configured as Internal — owned by the customer's own Google Workspace organization and limited to users in that organization — are fully exempt from verification, the CASA security assessment, and the 100-user cap.

Required OAuth Scopes

Add the following Google OAuth scopes to your OAuth consent screen, grouped by the service they enable:

Service
Scope
Type
Description

Gmail

https://www.googleapis.com/auth/userinfo.email

Delegated

View the user's email address (sign-in / identity)

Gmail

https://www.googleapis.com/auth/gmail.compose

Delegated

Compose and send messages, and create and manage drafts

Gmail

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

Delegated

Read and search messages, threads, labels, and attachments

Google Calendar

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

Delegated

Full read/write access to calendars and events, including free/busy

Google Drive

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

Delegated

Read and download Drive files and content

Google Drive

https://www.googleapis.com/auth/drive.metadata.readonly

Delegated

Read Drive file metadata (names, owners, types, dates) for search

Notes

  • The Google Agent reads from Google Drive only (search and download), so Drive scopes are read-only by design.

  • Gmail access is split between gmail.readonly (reading and searching) and gmail.compose (composing, sending, and managing drafts).

  • userinfo.email identify the signed-in user and only need to be added once on the consent screen.

  • Offline access (refresh tokens) is handled by Blockbrain's OAuth broker (Nango) via access_type=offline — there is no separate "offline" scope to add.

Scope Configuration Steps

  1. In the Google Cloud Console, go to APIs & Services > Enabled APIs & services and enable the Gmail, Google Calendar, and Google Drive APIs.

  2. Go to APIs & Services > OAuth consent screen and configure the consent screen (Internal for a single Workspace, or External as required).

  3. Under Scopes, click Add or remove scopes and add each required scope listed above.

  4. Go to APIs & Services > Credentials > Create credentials > OAuth client ID, choose Web application, and create the client.

  5. Note the Client ID and Client Secret — you will enter these in Blockbrain.

Google Agent Configuration in Blockbrain

Gmail

  • Scopes (in app)

    • https://www.googleapis.com/auth/userinfo.email

    • https://www.googleapis.com/auth/gmail.compose

    • https://www.googleapis.com/auth/gmail.readonly

GCalender

Scopes (in app)

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

GDrive

Scopes (in app)

  • https://www.googleapis.com/auth/drive.readonly

  • https://www.googleapis.com/auth/drive.metadata.readonly

Configuration Steps

  1. Access Agent Settings:

    • Navigate to your Blockbrain admin panel

    • Go to Agents > Gmail/Google Calendar/Google Drive Agent

    • Click "Install"

  2. Enter Google Credentials:

    • Client ID: Enter the Client ID from your Google OAuth client

    • Client Secret: Paste the client secret you generated

  3. Configure OAuth Scopes:

    • Add each required scope individually using the "Add" button as listed above

    • Each scope appears as a removable tag with visual indicators

    • Use the "X" button to remove any incorrect scopes

  4. Save Configuration:

    • Click "Save" to apply all settings

Common Google Integration Use Cases

Email Management

  • Automated Responses: AI-powered email replies and drafting

  • Email Analysis: Content analysis and summarization

  • Search & Retrieval: Find and summarize specific emails

Calendar Integration

  • Meeting Scheduling: AI-assisted meeting coordination with overlap detection

  • Event Creation: Automated calendar event generation with sensible default durations

  • Availability Analysis: Free/busy lookups to suggest open time slots

Document Management

  • File Discovery: Locate documents by name, content, type, owner, or date

  • Content Analysis: Summarize and extract key points from retrieved documents

  • Cross-Referencing: Connect information across related files for reporting

Troubleshooting

Email Permission Errors

Problem: Cannot send or read emails

  • Solution: Confirm both gmail.readonly (reading/search) and gmail.compose (sending and drafts) scopes are granted

  • Check: Verify the user has an active Gmail mailbox and the Gmail API is enabled

  • Validate: Test with a different user account to isolate permission issues

Calendar Access Issues

Problem: Calendar events not accessible

  • Solution: Ensure the https://www.googleapis.com/auth/calendar scope is properly configured

  • Check: Verify the user has calendar access and the Google Calendar API is enabled

  • Test: Try listing calendars to confirm read access before testing writes

Drive Access Issues

Problem: Documents not found or not downloadable

  • Solution: Ensure the drive.readonly and drive.metadata.readonly scopes are granted and the Google Drive API is enabled

  • Check: Confirm the file is owned by, or shared with, the connected user

  • Note: The agent has read-only Drive access — it can search and download, but not create or edit files

Security and Compliance

Data Protection

  • Email Security: All email data is handled according to Blockbrain's security policies

  • Calendar Privacy: Calendar access respects user privacy settings and sharing permissions

  • Document Confidentiality: Drive content is accessed read-only and processed with appropriate confidentiality measures

Compliance Considerations

  • GDPR Compliance: Email, calendar, and document data processing follows GDPR requirements

  • Data Retention: Configure appropriate data retention policies for email and calendar data

  • Audit Logging: All Google Agent activities are logged for compliance reporting

Access Control

  • User Permissions: Agent inherits the authenticated user's Google permissions

  • Delegation: Respects Google Drive and calendar sharing permissions

  • Domain Controls: Can be governed via Google Workspace API access controls and app allowlisting

Next Steps

After successful Google Agent configuration:

  • User Training: Provide training on email, calendar, and document AI features

  • Integration Setup: Configure integration with existing business workflows

  • Monitoring: Set up monitoring for agent performance and usage

  • Complementary Agents: Consider the Outlook Agent for organizations running both Google and Microsoft 365 environments

Support and Resources

For assistance with Google Agent configuration:

  • Blockbrain Support: Contact your Customer Success Manager for feature-specific help

  • Google Documentation: Reference the Gmail, Google Calendar, and Google Drive API documentation for detailed scope information

  • Google Cloud Troubleshooting: Use the Google Cloud Console and Workspace Admin audit logs for authentication diagnostics

Last updated