Offbeat Iot
Get started
Using the Google Calendar integration

Using the Google Calendar integration

Send provider-neutral calendar commands from your device to a linked Google Calendar account. The user picks which calendars are watched and queried; when no calendar is selected explicitly, the primary calendar is used.

Calendars

List calendars (calendar.calendars.list)

Returns the calendars the linked Google account can access, with the current selection state.

Request
{
  "jsonrpc" : "2.0",
  "id" : "cal-1",
  "method" : "calendar.calendars.list",
  "params" : {
    "target" : "Google Calendar"
  }
}
Example response
{
  "jsonrpc" : "2.0",
  "id" : "cal-1",
  "result" : {
    "calendars" : [ {
      "id" : "primary",
      "summary" : "Primary",
      "primary" : true,
      "accessRole" : "owner",
      "selected" : true
    } ]
  }
}

Events

List events (calendar.events.list)

Lists events in an optional time window for the selected calendar(s). Provide from and/or to as RFC-3339 timestamps to bound the window.

Request
{
  "jsonrpc" : "2.0",
  "id" : "cal-2",
  "method" : "calendar.events.list",
  "params" : {
    "target" : "Google Calendar",
    "from" : "2026-09-08T00:00:00Z",
    "to" : "2026-09-09T00:00:00Z"
  }
}
Example response
{
  "jsonrpc" : "2.0",
  "id" : "cal-2",
  "result" : {
    "events" : [ {
      "id" : "gcal-1",
      "title" : "Daily standup",
      "description" : "Daily engineering sync",
      "start" : "2026-09-08T09:00:00Z",
      "end" : "2026-09-08T09:15:00Z",
      "allDay" : false
    } ]
  }
}
Create an event (calendar.event.create)

Creates an event on the primary or an explicitly selected calendar. title, start and end are required; start/end are RFC-3339 timestamps.

Request
{
  "jsonrpc" : "2.0",
  "id" : "cal-3",
  "method" : "calendar.event.create",
  "params" : {
    "target" : "Google Calendar",
    "calendarId" : "primary",
    "title" : "Team sync",
    "start" : "2026-09-09T10:00:00Z",
    "end" : "2026-09-09T10:30:00Z"
  }
}
Example response
{
  "jsonrpc" : "2.0",
  "id" : "cal-3",
  "result" : {
    "event" : {
      "id" : "gcal-2",
      "title" : "Team sync",
      "description" : null,
      "start" : "2026-09-09T10:00:00Z",
      "end" : "2026-09-09T10:30:00Z",
      "allDay" : false
    }
  }
}
Invalid event error

Returns INVALID_MESSAGE when calendar.event.create has no non-blank title or a missing/invalid start/end.

Example response
{
  "jsonrpc" : "2.0",
  "id" : "cal-4",
  "error" : {
    "code" : -32001,
    "message" : "Canonical request failed",
    "data" : {
      "reason" : "INVALID_MESSAGE",
      "retryable" : false,
      "retryAfterMs" : null
    }
  }
}

Notifications

Event started (calendar.event.started)

Sent by the backend when a watched event starts. It is a server-originated canonical event: the device does not request it.

Websocket notification
{
  "jsonrpc": "2.0",
  "method": "calendar.event.started",
  "params": {
    "id": "gcal-1",
    "title": "Daily standup",
    "start": "2026-09-08T09:00:00Z",
    "end": "2026-09-08T09:15:00Z",
    "allDay": false
  }
}
Examples