Google Calendar Skill
Manage Google Calendar events — list upcoming, create, update, and delete events using the Calendar API v3.
Setup
- •Create a project at console.cloud.google.com
- •Enable the Google Calendar API
- •Create OAuth 2.0 credentials or use a service account
- •Get an access token:
bash
# If you have gcloud CLI installed: export GOOGLE_ACCESS_TOKEN=$(gcloud auth print-access-token) # Or set manually from OAuth flow: export GOOGLE_ACCESS_TOKEN="ya29.xxx..." export CALENDAR_ID="primary"
List Upcoming Events
bash
curl -s "https://www.googleapis.com/calendar/v3/calendars/${CALENDAR_ID:-primary}/events?maxResults=10&orderBy=startTime&singleEvents=true&timeMin=$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
-H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
| jq '.items[] | {summary, start: .start.dateTime, end: .end.dateTime, id}'
Create an Event
bash
curl -s -X POST "https://www.googleapis.com/calendar/v3/calendars/${CALENDAR_ID:-primary}/events" \
-H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"summary": "Team Standup",
"start": {"dateTime": "2026-03-01T09:00:00+08:00"},
"end": {"dateTime": "2026-03-01T09:30:00+08:00"},
"description": "Daily standup meeting",
"location": "Google Meet"
}' | jq '{id, summary, htmlLink}'
Update an Event
bash
EVENT_ID="event-id-from-list"
curl -s -X PATCH "https://www.googleapis.com/calendar/v3/calendars/${CALENDAR_ID:-primary}/events/$EVENT_ID" \
-H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"summary": "Updated Meeting Title"}' | jq '{id, summary, updated}'
Delete an Event
bash
EVENT_ID="event-id-from-list"
curl -s -X DELETE "https://www.googleapis.com/calendar/v3/calendars/${CALENDAR_ID:-primary}/events/$EVENT_ID" \
-H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
-w "\nHTTP Status: %{http_code}\n"
Tips
- •
CALENDAR_IDdefaults toprimaryif not set - •Use
singleEvents=trueto expand recurring events into individual instances - •Token expires every ~60 minutes — refresh with
gcloud auth print-access-token - •Rate limit: 1,000,000 queries/day (generous)
- •Time format must be RFC 3339 with timezone offset
- •All-day events use
datefield instead ofdateTime