Skills

Google Workspace

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

Install

npx skills add taracodlabs/aiden --skill google-workspace -g -a claude-code -y
Repository
taracodlabs/aiden868
Category
Engineering
Updated
16d ago
License
Apache-2.0
Context cost
Lightabout 1,028 tokens
Runs scripts
No, instructions only

What it does

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

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):

# 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

$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

$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

Read the whole SKILL.md on GitHub

More in Engineering