Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Provides REST API access to Gmail, Calendar, Drive, Sheets, and Docs using service account or OAuth2 credentials.
73% 95%+23 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 16 of 22 without it.
3 of 3 safety checks passed
Not used yet
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.
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.
$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
}
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.