Skip to main content
Access Drive, Gmail, Calendar, Sheets, Docs and more via the gws CLI

Capabilities

Once connected, your agent can interact with all Google Workspace services using the pre-installed gws CLI.
  • List, upload, download, and share Google Drive files
  • Send, read, search, and label Gmail messages
  • Create, list, and manage Google Calendar events
  • Read, write, and append data in Google Sheets
  • Create and edit Google Docs
  • Send messages in Google Chat spaces
  • Discover any Google Workspace API dynamically
  • Structured JSON output for all commands

Available Scopes

ServiceScopeDescription
Drivehttps://www.googleapis.com/auth/driveFull read/write access to Google Drive
Gmailhttps://www.googleapis.com/auth/gmail.modifyRead, send, and label emails
Calendarhttps://www.googleapis.com/auth/calendarFull read/write access to Calendar
Sheetshttps://www.googleapis.com/auth/spreadsheetsFull read/write access to Spreadsheets
Docshttps://www.googleapis.com/auth/documentsFull read/write access to Documents
Chathttps://www.googleapis.com/auth/chat.messagesSend and read Chat messages
Taskshttps://www.googleapis.com/auth/tasksManage task lists and tasks
Contactshttps://www.googleapis.com/auth/contactsRead/write contacts via People API

Connect Google Workspace

You create your own OAuth client in Google Cloud so you control the credentials. The whole process takes about three minutes. Select the services you need first. The API link in step 1 updates automatically.

1. Enable the required APIs

Enable the required APIs in Google Cloud. You’ll be prompted to create a project if you don’t have one. Open the OAuth consent screen. Click Get Started, enter any app name and your email for App Information, select External for Audience, add your email again for Contact Information, and click Create. Then open Audience and click Publish. Publishing is safe for personal use; Google only requires verification for apps with many users.

3. Create OAuth credentials

Go to Credentials and create a new OAuth client. Select Web application, add the redirect URI, and click Create. Copy the Client ID and Client Secret.

4. Enter credentials and connect

Enter the Client ID and Client Secret, then click Connect Google Workspace. The dashboard redirects you to Google for authorization, then stores the refresh token automatically. Credentials are encrypted at rest. The dashboard redirects you to Google for authorization, then stores the refresh token automatically. After connecting successfully, your GWS_CREDENTIALS_JSON secret will be created and set as global. All your instances can now use Google Workspace.

Usage Examples

Ask your agent to interact with Google Workspace using natural language. Google Drive
“List my 10 most recent Google Drive files”
“Upload report.pdf to my Drive”
Gmail
“Send an email to [email protected] with subject Weekly Report”
“Show my unread emails from [email protected]
Calendar
“Show my calendar agenda for this week”
“Create a meeting with Alice tomorrow at 2pm”
Sheets
“Create a spreadsheet called Q1 Budget”
“Read rows A1:D10 from my Sales spreadsheet”