You have submission deadlines blocked in your calendar. Before the weekly lab meeting, you want to know which ones fall in the next two weeks. Currently, how do you check?
list_calendars from Day 10 gave me the calendar IDs. To find upcoming events I'd open Google Calendar and scan the next two weeks manually. Which I do every Monday.
GOOGLECALENDAR_FIND_EVENT takes a calendar ID and a time_min — an ISO 8601 datetime string. It returns all events starting after that time. Your "next two weeks" query is one function call:
result = toolset.execute_action(
Action.GOOGLECALENDAR_FIND_EVENT,
{"calendar_id": cal_id, "time_min": time_min}
)
events = result.get("items", [])What's the time_min format? Is it a timestamp, a date, or a datetime string?
ISO 8601 format: "2026-04-20T09:00:00Z" — date, then T, then time, then Z for UTC. Python's datetime module can generate it: datetime.utcnow().isoformat() + "Z". For a two-week window, add 14 days: (datetime.utcnow() + timedelta(days=14)).isoformat() + "Z". The action uses it as the lower bound — events starting after this time are returned.
So find_events(cal_id, "2026-04-20T00:00:00Z") returns all my deadlines from April 20 onwards? That's the Monday morning calendar check, automated.
The Monday morning calendar check, 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("items", [])
print(f"Found {len(events)} events after {time_min}")
return eventsThree submission deadlines — conference, journal, workshop — all surfaced in milliseconds. That replaces my Monday morning calendar scan.
One consideration: time_min filters events starting after the given time, not events that are ongoing at that time. A multi-day conference block that started before time_min won't appear. For deadline tracking this is usually fine — deadlines are point-in-time events. For finding ongoing availability windows, you'd also need a time_max parameter.
result = toolset.execute_action(
Action.GOOGLECALENDAR_FIND_EVENT,
{"calendar_id": cal_id, "time_min": "2026-04-20T00:00:00Z"}
)
events = result.get("items", [])YYYY-MM-DDTHH:MM:SSZ — date + T + time + Z (UTC). Generate with Python:
from datetime import datetime, timedelta
now = datetime.utcnow().isoformat() + "Z"
two_weeks = (datetime.utcnow() + timedelta(days=14)).isoformat() + "Z"| Field | Meaning |
|---|---|
id | Event ID for updating or deleting |
summary | Event title |
start.dateTime | Start time (ISO 8601) |
You have submission deadlines blocked in your calendar. Before the weekly lab meeting, you want to know which ones fall in the next two weeks. Currently, how do you check?
list_calendars from Day 10 gave me the calendar IDs. To find upcoming events I'd open Google Calendar and scan the next two weeks manually. Which I do every Monday.
GOOGLECALENDAR_FIND_EVENT takes a calendar ID and a time_min — an ISO 8601 datetime string. It returns all events starting after that time. Your "next two weeks" query is one function call:
result = toolset.execute_action(
Action.GOOGLECALENDAR_FIND_EVENT,
{"calendar_id": cal_id, "time_min": time_min}
)
events = result.get("items", [])What's the time_min format? Is it a timestamp, a date, or a datetime string?
ISO 8601 format: "2026-04-20T09:00:00Z" — date, then T, then time, then Z for UTC. Python's datetime module can generate it: datetime.utcnow().isoformat() + "Z". For a two-week window, add 14 days: (datetime.utcnow() + timedelta(days=14)).isoformat() + "Z". The action uses it as the lower bound — events starting after this time are returned.
So find_events(cal_id, "2026-04-20T00:00:00Z") returns all my deadlines from April 20 onwards? That's the Monday morning calendar check, automated.
The Monday morning calendar check, 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("items", [])
print(f"Found {len(events)} events after {time_min}")
return eventsThree submission deadlines — conference, journal, workshop — all surfaced in milliseconds. That replaces my Monday morning calendar scan.
One consideration: time_min filters events starting after the given time, not events that are ongoing at that time. A multi-day conference block that started before time_min won't appear. For deadline tracking this is usually fine — deadlines are point-in-time events. For finding ongoing availability windows, you'd also need a time_max parameter.
result = toolset.execute_action(
Action.GOOGLECALENDAR_FIND_EVENT,
{"calendar_id": cal_id, "time_min": "2026-04-20T00:00:00Z"}
)
events = result.get("items", [])YYYY-MM-DDTHH:MM:SSZ — date + T + time + Z (UTC). Generate with Python:
from datetime import datetime, timedelta
now = datetime.utcnow().isoformat() + "Z"
two_weeks = (datetime.utcnow() + timedelta(days=14)).isoformat() + "Z"| Field | Meaning |
|---|---|
id | Event ID for updating or deleting |
summary | Event title |
start.dateTime | Start time (ISO 8601) |
Create a free account to get started. Paid plans unlock all tracks.