Appearance
Google Workspace Connector
The Google Workspace connector provides comprehensive access to your organization's Google Workspace environment with 27 live tools spanning Drive, Gmail, Calendar, Sheets, Docs, Tasks, Contacts, Chat, and Admin, plus full ETL ingestion into the knowledge graph.
Authentication
The connector supports two authentication modes: OAuth2 (for user-level access) and Service Account (for domain-wide delegation).
OAuth2
json
{
"name": "Workspace OAuth",
"source_type": "google_workspace",
"config": {
"auth_mode": "oauth2",
"client_id": "123456789.apps.googleusercontent.com",
"client_secret": "GOCSPX-...",
"refresh_token": "1//0abc...",
"modules": ["drive", "gmail", "calendar", "sheets"]
}
}Service Account
json
{
"name": "Workspace Service Account",
"source_type": "google_workspace",
"config": {
"auth_mode": "service_account",
"service_account_json": "{...}",
"impersonate_email": "admin@example.com",
"modules": ["drive", "gmail", "calendar", "admin"]
}
}| Variable | Required | Description |
|---|---|---|
auth_mode | Yes | Authentication mode: oauth2 or service_account |
client_id | OAuth2 | Google OAuth2 client ID |
client_secret | OAuth2 | Google OAuth2 client secret |
refresh_token | OAuth2 | OAuth2 refresh token |
service_account_json | SA | Service account JSON key (stringified) |
impersonate_email | SA | Email to impersonate via domain-wide delegation |
modules | No | Modules to enable: drive, gmail, calendar, sheets, docs, tasks, contacts, chat, admin |
TIP
For service account mode, enable domain-wide delegation in Google Admin Console and add the required API scopes for each module.
Live Tools (27)
Drive (4)
| Tool | Description | Arguments |
|---|---|---|
google_workspace_list_files | List files in Drive with metadata | folder_id?, page_size?, mime_type? |
google_workspace_search_files | Search files by name, content, or type | query, page_size? |
google_workspace_get_file_metadata | Get detailed metadata for a file | file_id |
google_workspace_list_folders | List folders in Drive | parent_id? |
Gmail (4)
| Tool | Description | Arguments |
|---|---|---|
google_workspace_list_emails | List recent emails with subject and sender | label?, max_results? |
google_workspace_search_emails | Search emails using Gmail query syntax | query, max_results? |
google_workspace_read_email | Read a specific email with full body | message_id |
google_workspace_send_email | Compose and send an email | to, subject, body, cc?, bcc? |
Calendar (4)
| Tool | Description | Arguments |
|---|---|---|
google_workspace_list_calendars | List available calendars | -- |
google_workspace_list_events | List upcoming events from a calendar | calendar_id?, time_min?, time_max?, max_results? |
google_workspace_get_event | Get details of a specific event | calendar_id, event_id |
google_workspace_create_event | Create a new calendar event | calendar_id, summary, start, end, attendees?, description? |
Sheets (3)
| Tool | Description | Arguments |
|---|---|---|
google_workspace_list_sheets | List all spreadsheets | page_size? |
google_workspace_read_sheet | Read data from a sheet range | spreadsheet_id, range |
google_workspace_update_sheet | Write data to a sheet range | spreadsheet_id, range, values |
Docs (3)
| Tool | Description | Arguments |
|---|---|---|
google_workspace_list_docs | List all documents | page_size? |
google_workspace_read_doc | Read the content of a document | document_id |
google_workspace_create_doc | Create a new document | title, content? |
Tasks (2)
| Tool | Description | Arguments |
|---|---|---|
google_workspace_list_tasks | List tasks from a task list | task_list_id?, show_completed? |
google_workspace_create_task | Create a new task | task_list_id?, title, notes?, due? |
Contacts (1)
| Tool | Description | Arguments |
|---|---|---|
google_workspace_list_contacts | List contacts with name, email, and phone | page_size?, query? |
Chat (3)
| Tool | Description | Arguments |
|---|---|---|
google_workspace_list_chat_spaces | List Google Chat spaces | page_size? |
google_workspace_list_messages | List messages in a Chat space | space_id, page_size? |
google_workspace_send_message | Send a message to a Chat space | space_id, text |
Admin (3)
| Tool | Description | Arguments |
|---|---|---|
google_workspace_admin_list_users | List users in the domain | query?, max_results? |
google_workspace_admin_get_user | Get detailed info for a specific user | user_key |
google_workspace_admin_list_groups | List groups in the domain | query?, max_results? |
Example: Agent Using Google Workspace Tools
User: "Find all Q4 reports shared with me in Drive"
Agent: Let me search your Drive.
→ Calls google_workspace_search_files(query: "Q4 report")
→ Returns: "Found 5 files matching 'Q4 report':
- Q4 Revenue Report 2025.xlsx (shared by finance@example.com)
- Q4 OKR Summary.docx (shared by vp-eng@example.com)
- Q4 Customer Metrics.gsheet (owned by you)
..."User: "Schedule a team standup every Monday at 9am"
Agent: I'll create the recurring event.
→ Calls google_workspace_create_event(
calendar_id: "primary",
summary: "Team Standup",
start: "2026-03-23T09:00:00",
end: "2026-03-23T09:30:00",
attendees: ["team@example.com"]
)
→ Returns: "Created recurring event 'Team Standup' on Mondays at 9:00 AM."ETL Ingestion
When you trigger a sync, the Google Workspace connector ingests the following resources into the knowledge graph.
Nodes Created
| Node Label | Properties | Google Service |
|---|---|---|
DriveFile | file_id, name, mime_type, size, created_time, modified_time, owner, shared | Drive |
DriveFolder | folder_id, name, parent_id, created_time, owner | Drive |
Email | message_id, subject, from, to, date, snippet, label_ids, has_attachments | Gmail |
Calendar | calendar_id, summary, time_zone, access_role | Calendar |
CalendarEvent | event_id, summary, start, end, status, organizer, attendee_count, recurring | Calendar |
Sheet | spreadsheet_id, title, sheet_count, locale, created_time | Sheets |
Document | document_id, title, revision_id, last_modified | Docs |
Task | task_id, title, status, due, notes, completed | Tasks |
Contact | resource_name, display_name, email, phone, organization | Contacts |
ChatSpace | space_name, display_name, type, member_count | Chat |
ChatMessage | message_name, sender, create_time, text | Chat |
WorkspaceUser | user_id, primary_email, full_name, is_admin, suspended, org_unit | Admin |
WorkspaceGroup | group_id, email, name, member_count, description | Admin |
Relationships Created
| Relationship | From | To |
|---|---|---|
CONTAINS | DriveFolder | DriveFile |
PARENT_OF | DriveFolder | DriveFolder |
OWNED_BY | DriveFile | WorkspaceUser |
SENT_BY | WorkspaceUser | |
HAS_EVENT | Calendar | CalendarEvent |
ATTENDS | WorkspaceUser | CalendarEvent |
AUTHORED | WorkspaceUser | Document |
ASSIGNED_TO | Task | WorkspaceUser |
POSTED_IN | ChatMessage | ChatSpace |
MEMBER_OF | WorkspaceUser | WorkspaceGroup |
Graph Queries
cypher
-- Find files shared across the organization
MATCH (f:DriveFile)-[:OWNED_BY]->(u:WorkspaceUser)
WHERE f.shared = true
RETURN u.primary_email, count(f) AS shared_files
ORDER BY shared_files DESC
-- Map meeting load per user
MATCH (u:WorkspaceUser)-[:ATTENDS]->(e:CalendarEvent)
WHERE e.start >= datetime("2026-03-01T00:00:00")
RETURN u.full_name, count(e) AS meetings
ORDER BY meetings DESC
-- Find users in a group and their recent documents
MATCH (u:WorkspaceUser)-[:MEMBER_OF]->(g:WorkspaceGroup),
(u)-[:AUTHORED]->(d:Document)
WHERE g.name = "Engineering"
RETURN u.full_name, collect(d.title) AS documentsConfiguration Reference
json
{
"name": "Workspace",
"source_type": "google_workspace",
"config": {
"auth_mode": "oauth2",
"client_id": "...",
"client_secret": "...",
"refresh_token": "...",
"modules": ["drive", "gmail", "calendar", "sheets", "docs", "tasks", "contacts", "chat", "admin"],
"drive_shared_drives": true,
"gmail_max_results": 500,
"calendar_time_range_days": 90
}
}| Field | Type | Default | Description |
|---|---|---|---|
auth_mode | string | required | oauth2 or service_account |
client_id | string | OAuth2 required | Google OAuth2 client ID |
client_secret | string | OAuth2 required | Google OAuth2 client secret |
refresh_token | string | OAuth2 required | OAuth2 refresh token |
service_account_json | string | SA required | Service account JSON key (stringified) |
impersonate_email | string | SA required | Email to impersonate |
modules | string[] | all | Modules to enable |
drive_shared_drives | bool | false | Include shared drives in ingestion |
gmail_max_results | number | 500 | Max emails to ingest per sync |
calendar_time_range_days | number | 90 | Days of calendar events to ingest |
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
invalid_grant | Refresh token expired or revoked | Re-authorize the OAuth2 flow to get a new refresh token |
403 insufficientPermissions | Missing API scope | Add the required scope in Google Cloud Console and re-authorize |
404 notFound | File, calendar, or resource does not exist | Verify the resource ID |
429 rateLimitExceeded | Google API quota exceeded | Reduce gmail_max_results or add delays between syncs |
Domain-wide delegation not configured | Service account lacks delegation | Enable delegation in Admin Console > Security > API Controls |
accessNotConfigured | API not enabled in Cloud Console | Enable the required API (Drive, Gmail, Calendar, etc.) in the Google Cloud project |