You can read events off your calendar. Today you add one from code. What's the shape of an event's payload going in?
A title (summary) and a time range — a start and an end? Probably as ISO datetime strings?
Exactly. GOOGLECALENDAR_CREATE_EVENT takes summary plus start and end as nested dicts keyed by dateTime. ISO 8601 is the shared format — "2026-05-01T10:00:00":
result = toolset.execute_action(Action.GOOGLECALENDAR_CREATE_EVENT, {
"summary": "Planning block",
"start": {"dateTime": "2026-05-01T10:00:00"},
"end": {"dateTime": "2026-05-01T11:00:00"},
})The caller passes a date string like 2026-05-01. I need to append T10:00:00 to form the full ISO timestamp?
Simplest path — concatenate the time to the date inside the function. You pick a default hour for the block so the caller only has to think about the day:
def create_event(title: str, start_date: str) -> dict:
result = toolset.execute_action(Action.GOOGLECALENDAR_CREATE_EVENT, {
"summary": title,
"start": {"dateTime": start_date + "T10:00:00"},
"end": {"dateTime": start_date + "T11:00:00"},
})
return resultWhy wrap dateTime in a dict at all? Why not just pass the string directly?
Calendar events support time zones, all-day events, and recurring patterns — the nested dict leaves room for those extra fields. {"dateTime": ...} is the shape the API expects; adding "timeZone": "America/Los_Angeles" later is one more key, no restructuring.
So after this function runs, the event actually appears on my calendar — I can open Google Calendar in my browser and see it?
Open your Calendar tab after the test runs. The block you created will be sitting there at 10 AM. Automation stops being theoretical the moment you see your calendar change.
TL;DR: Wrap datetimes in {"dateTime": "..."} dicts so you can add time zones or switch to all-day later.
Action.GOOGLECALENDAR_CREATE_EVENTid, summary, statustimeZone or location later as sibling keys| Field | Example |
|---|---|
| Date only | "2026-05-01" |
| DateTime | "2026-05-01T10:00:00" |
You can read events off your calendar. Today you add one from code. What's the shape of an event's payload going in?
A title (summary) and a time range — a start and an end? Probably as ISO datetime strings?
Exactly. GOOGLECALENDAR_CREATE_EVENT takes summary plus start and end as nested dicts keyed by dateTime. ISO 8601 is the shared format — "2026-05-01T10:00:00":
result = toolset.execute_action(Action.GOOGLECALENDAR_CREATE_EVENT, {
"summary": "Planning block",
"start": {"dateTime": "2026-05-01T10:00:00"},
"end": {"dateTime": "2026-05-01T11:00:00"},
})The caller passes a date string like 2026-05-01. I need to append T10:00:00 to form the full ISO timestamp?
Simplest path — concatenate the time to the date inside the function. You pick a default hour for the block so the caller only has to think about the day:
def create_event(title: str, start_date: str) -> dict:
result = toolset.execute_action(Action.GOOGLECALENDAR_CREATE_EVENT, {
"summary": title,
"start": {"dateTime": start_date + "T10:00:00"},
"end": {"dateTime": start_date + "T11:00:00"},
})
return resultWhy wrap dateTime in a dict at all? Why not just pass the string directly?
Calendar events support time zones, all-day events, and recurring patterns — the nested dict leaves room for those extra fields. {"dateTime": ...} is the shape the API expects; adding "timeZone": "America/Los_Angeles" later is one more key, no restructuring.
So after this function runs, the event actually appears on my calendar — I can open Google Calendar in my browser and see it?
Open your Calendar tab after the test runs. The block you created will be sitting there at 10 AM. Automation stops being theoretical the moment you see your calendar change.
TL;DR: Wrap datetimes in {"dateTime": "..."} dicts so you can add time zones or switch to all-day later.
Action.GOOGLECALENDAR_CREATE_EVENTid, summary, statustimeZone or location later as sibling keys| Field | Example |
|---|---|
| Date only | "2026-05-01" |
| DateTime | "2026-05-01T10:00:00" |
Create a free account to get started. Paid plans unlock all tracks.