Trillet AI logo

List Google Calendars

List the Google Calendars the connected account can write to.

GEThttps://api.trillet.ai/v1/api/gcal/calendars

Only calendars where the connected Google account is an owner or writer are returned. Read-only calendars are left out, because the agent can't book into them.

Headers

x-workspace-idstringrequired

Workspace identifier for the API. The call flow must belong to this workspace (or one of its sub-workspaces).

Query Parameters

pathwayIdstringrequired

The _id of the call flow that has the Google Calendar connection.

Response Fields

calendarsarray

The calendars the connected account can write to.

Errors

StatusBodyWhen
400{"error": "pathwayId query parameter is required"}No pathwayId
400{"error": "Invalid pathwayId"}pathwayId isn't a valid ID
403{"error": "You do not have access to this workspace."}You aren't a member of the x-workspace-id workspace
403{"error": "Pathway does not belong to this workspace."}The flow belongs to another workspace
404{"error": "Pathway not found"}No call flow with that ID
500{"error": "Failed to refresh Google Calendar token"}The stored Google token could not be refreshed. Reconnect with Install Google Calendar
{
  "calendars": [
    {
      "id": "jane@company.com",
      "summary": "Jane Doe",
      "description": "",
      "primary": true,
      "timeZone": "America/New_York"
    },
    {
      "id": "c_8f2e1a@group.calendar.google.com",
      "summary": "Appointments",
      "description": "Customer bookings",
      "primary": false,
      "timeZone": "America/New_York"
    }
  ]
}

Last updated on