list_calendars from yesterday gives you the calendar IDs. Now you search for upcoming events in a specific calendar — client kickoffs, check-ins, deadline calls. The same list-and-filter pattern as Gmail.
Pass the calendar ID and a start time. Get back the events happening after that point.
Exactly. GOOGLECALENDAR_FIND_EVENT takes calendar_id and time_min — an ISO 8601 datetime string like "2026-04-20T00:00:00Z". The response has an events key with a list of event dicts, each containing summary, start, end, and the event ID:
result = toolset.execute_action(
Action.GOOGLECALENDAR_FIND_EVENT,
{"calendar_id": cal_id, "time_min": "2026-04-20T00:00:00Z"}
)
events = result.get("events", [])
for e in events:
print(f"{e.get('summary')}: {e.get('start')}")Why ISO format? Can I pass "April 20" instead?
Calendar APIs expect unambiguous timestamps. "April 20" is ambiguous — which year, which timezone? ISO 8601 "2026-04-20T00:00:00Z" is unambiguous: year, month, day, time, UTC offset. Python's datetime.now().isoformat() + "Z" produces a valid timestamp for right now.
So I can find all events after today, filter to the ones with a client name in the title, and know which kickoffs are coming up without opening Calendar.
Client kickoff monitoring without touching the Calendar UI. Your whole week visible in one function call:
def find_events(cal_id: str, time_min: str) -> list:
result = toolset.execute_action(
Action.GOOGLECALENDAR_FIND_EVENT,
{"calendar_id": cal_id, "time_min": time_min}
)
events = result.get("events", [])
print(f"Found {len(events)} upcoming events")
return eventsMy weekly calendar review is one function call. My client management is finally programmable.
And next week find_events feeds directly into add_task — every upcoming kickoff generates a preparation task automatically.
GOOGLECALENDAR_FIND_EVENT searches events in a calendar starting from a given ISO timestamp:
result = toolset.execute_action(
action=Action.GOOGLECALENDAR_FIND_EVENT,
params={'calendarId': cal_id, 'timeMin': time_min}
)
events = result.get('events', [])Use datetime.utcnow().isoformat() + 'Z' for the current time in UTC. The Z suffix indicates UTC — required by the Google Calendar API. Without it, the timezone interpretation is ambiguous.
Read before write: always fetch events before creating new ones. This lets you check for existing kickoff events and avoid creating duplicates in a client's calendar.
list_calendars from yesterday gives you the calendar IDs. Now you search for upcoming events in a specific calendar — client kickoffs, check-ins, deadline calls. The same list-and-filter pattern as Gmail.
Pass the calendar ID and a start time. Get back the events happening after that point.
Exactly. GOOGLECALENDAR_FIND_EVENT takes calendar_id and time_min — an ISO 8601 datetime string like "2026-04-20T00:00:00Z". The response has an events key with a list of event dicts, each containing summary, start, end, and the event ID:
result = toolset.execute_action(
Action.GOOGLECALENDAR_FIND_EVENT,
{"calendar_id": cal_id, "time_min": "2026-04-20T00:00:00Z"}
)
events = result.get("events", [])
for e in events:
print(f"{e.get('summary')}: {e.get('start')}")Why ISO format? Can I pass "April 20" instead?
Calendar APIs expect unambiguous timestamps. "April 20" is ambiguous — which year, which timezone? ISO 8601 "2026-04-20T00:00:00Z" is unambiguous: year, month, day, time, UTC offset. Python's datetime.now().isoformat() + "Z" produces a valid timestamp for right now.
So I can find all events after today, filter to the ones with a client name in the title, and know which kickoffs are coming up without opening Calendar.
Client kickoff monitoring without touching the Calendar UI. Your whole week visible in one function call:
def find_events(cal_id: str, time_min: str) -> list:
result = toolset.execute_action(
Action.GOOGLECALENDAR_FIND_EVENT,
{"calendar_id": cal_id, "time_min": time_min}
)
events = result.get("events", [])
print(f"Found {len(events)} upcoming events")
return eventsMy weekly calendar review is one function call. My client management is finally programmable.
And next week find_events feeds directly into add_task — every upcoming kickoff generates a preparation task automatically.
GOOGLECALENDAR_FIND_EVENT searches events in a calendar starting from a given ISO timestamp:
result = toolset.execute_action(
action=Action.GOOGLECALENDAR_FIND_EVENT,
params={'calendarId': cal_id, 'timeMin': time_min}
)
events = result.get('events', [])Use datetime.utcnow().isoformat() + 'Z' for the current time in UTC. The Z suffix indicates UTC — required by the Google Calendar API. Without it, the timezone interpretation is ambiguous.
Read before write: always fetch events before creating new ones. This lets you check for existing kickoff events and avoid creating duplicates in a client's calendar.
Create a free account to get started. Paid plans unlock all tracks.