Google

Check Google Calendar Free/Busy

Shows the busy periods on a Google Calendar in a time range.

Unverified

Add this first. This tool needs an access token, so add Get Google Access Token to the same bot. The bot calls it first and passes the token in.

What the model is told

Check when the calendar is busy so you can offer free times. Get a Google access token first if you do not have one. Pass a start and end as RFC 3339 times with an offset. Any gaps between the returned busy periods are free. Do not tell the customer what the busy periods are, only which times are free.

Request

POSThttps://www.googleapis.com/calendar/v3/freeBusy

Headers

  • Content-Typeapplication/json
  • AuthorizationBearer {{accessToken}}

Body

{
  "timeMin": "{{timeMin}}",
  "timeMax": "{{timeMax}}",
  "timeZone": "{{timeZone}}",
  "items": [
    {
      "id": "YOUR_GOOGLE_CALENDAR_ID"
    }
  ]
}

Parameters

  • timeMin stringStart of the range, RFC 3339 with offset.
  • timeMax stringEnd of the range, RFC 3339 with offset.
  • timeZone stringIANA time zone for the response.
  • accessToken stringThe access_token value returned by the token tool. Reuse it for the rest of the conversation.

Engage payload

{
  "source": "VOICE_AI",
  "tool": {
    "id": "c8c8d4c9-aa82-4780-9fd2-25b6b263e6e7",
    "type": "HTTP_REQUEST",
    "label": "Check Google Calendar Free/Busy",
    "name": "check_google_calendar_free_busy",
    "customName": false,
    "description": "Check when the calendar is busy so you can offer free times. Get a Google access token first if you do not have one. Pass a start and end as RFC 3339 times with an offset. Any gaps between the returned busy periods are free. Do not tell the customer what the busy periods are, only which times are free.",
    "parameters": [
      {
        "name": "timeMin",
        "type": "string",
        "description": "Start of the range, RFC 3339 with offset."
      },
      {
        "name": "timeMax",
        "type": "string",
        "description": "End of the range, RFC 3339 with offset."
      },
      {
        "name": "timeZone",
        "type": "string",
        "description": "IANA time zone for the response."
      },
      {
        "name": "accessToken",
        "type": "string",
        "description": "The access_token value returned by the token tool. Reuse it for the rest of the conversation."
      }
    ],
    "config": {
      "endpoint": {
        "method": "POST",
        "url": "https://www.googleapis.com/calendar/v3/freeBusy"
      },
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Authorization",
          "value": "Bearer {{accessToken}}"
        }
      ],
      "body": "{\n  \"timeMin\": \"{{timeMin}}\",\n  \"timeMax\": \"{{timeMax}}\",\n  \"timeZone\": \"{{timeZone}}\",\n  \"items\": [\n    {\n      \"id\": \"YOUR_GOOGLE_CALENDAR_ID\"\n    }\n  ]\n}",
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.