# Google Workspace

Interact with Gmail, Google Calendar, Drive, Sheets, and Docs via the Google API with...

- Repository: https://github.com/taracodlabs/aiden (868 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-19
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add taracodlabs/aiden --skill google-workspace -g -a claude-code -y`
Codex: `npx skills add taracodlabs/aiden --skill google-workspace -g -a codex -y`
Cursor: `npx skills add taracodlabs/aiden --skill google-workspace -g -a cursor -y`
Gemini CLI: `npx skills add taracodlabs/aiden --skill google-workspace -g -a gemini-cli -y`

## Description

Interact with Gmail, Google Calendar, Drive, Sheets, and Docs via the Google API with service account or OAuth credentials

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Google Workspace Integration

Access Gmail, Google Calendar, Drive, Sheets, and Docs through the Google REST APIs. Requires either a service account JSON key (`GOOGLE_APPLICATION_CREDENTIALS`) or an OAuth2 access token.

## When to Use

- User wants to read or send Gmail messages
- User wants to list or create Google Calendar events
- User wants to read/write a Google Sheet
- User wants to list Google Drive files
- User wants to read or update a Google Doc

## How to Use

### 1. Authenticate, OAuth token (quickest)

Get a short-lived access token via `gcloud` CLI (requires Google Cloud SDK installed):

```powershell
# One-time login (opens browser)
gcloud auth login
# Get token for API calls
$token = (gcloud auth print-access-token)
$headers = @{ "Authorization" = "Bearer $token" }
```

For service accounts, set `GOOGLE_APPLICATION_CREDENTIALS` to the JSON key path and use `gcloud auth application-default print-access-token`.

### 2. List recent Gmail messages

```powershell
$resp = Invoke-RestMethod -Uri "https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults=10" -Headers $headers
$resp.messages | ForEach-Object {
  $msg = Invoke-RestMethod -Uri "https://gmail.googleapis.com/gmail/v1/users/me/messages/$($_.id)?format=metadata&metadataHeaders=Subject,From,Date" -Headers $headers
  $msg.payload.headers | Where-Object { $_.name -in @("Subject","From","Date") } | Select-Object name,value
}
```

### 3. List today's Calendar events

```powershell
$now   = [System.DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
$end   = [System.DateTime]::UtcNow.AddDays(1).ToString("yyyy-MM-ddTHH:mm:ssZ")
$resp  = Invoke-RestMethod -Uri "https://www.googleapis.com/calendar/v3/calendars/primary/events?timeMin=$now&timeMax=$end&singleEvents=true&orderBy=startTime" -Headers $headers
$resp.items | Select-Object summary, @{N="start";E={$_.start.dateTime}}
```

### 4. Read a Google Sheet

The rest: https://github.com/taracodlabs/aiden/blob/HEAD/workspace-templates/skills/google-workspace/SKILL.md
