Google

Create Google Calendar Event

Adds an event to a Google Calendar and invites the customer.

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

Create a calendar event for a booking or appointment. Get a Google access token first if you do not have one. Check free/busy first, and confirm the time, title and the customer's email address with the customer before creating it. Times are RFC 3339 with an offset. The customer is emailed an invitation. Tell them the event is booked.

Request

POSThttps://www.googleapis.com/calendar/v3/calendars/YOUR_GOOGLE_CALENDAR_ID/events?sendUpdates=all

Headers

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

Body

{
  "summary": "{{summary}}",
  "description": "{{description}}",
  "start": {
    "dateTime": "{{startTime}}",
    "timeZone": "{{timeZone}}"
  },
  "end": {
    "dateTime": "{{endTime}}",
    "timeZone": "{{timeZone}}"
  },
  "attendees": [
    {
      "email": "{{customerEmail}}"
    }
  ]
}

Parameters

  • summary stringThe event title.
  • description stringNotes about the booking.
  • startTime stringStart time, RFC 3339.
  • endTime stringEnd time, RFC 3339.
  • timeZone stringIANA time zone of the event.
  • customerEmail stringThe customer's email address, to send the invitation to.
  • 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": "006334ea-7910-4198-83fc-7bc3449b7384",
    "type": "HTTP_REQUEST",
    "label": "Create Google Calendar Event",
    "name": "create_google_calendar_event",
    "customName": false,
    "description": "Create a calendar event for a booking or appointment. Get a Google access token first if you do not have one. Check free/busy first, and confirm the time, title and the customer's email address with the customer before creating it. Times are RFC 3339 with an offset. The customer is emailed an invitation. Tell them the event is booked.",
    "parameters": [
      {
        "name": "summary",
        "type": "string",
        "description": "The event title."
      },
      {
        "name": "description",
        "type": "string",
        "description": "Notes about the booking."
      },
      {
        "name": "startTime",
        "type": "string",
        "description": "Start time, RFC 3339."
      },
      {
        "name": "endTime",
        "type": "string",
        "description": "End time, RFC 3339."
      },
      {
        "name": "timeZone",
        "type": "string",
        "description": "IANA time zone of the event."
      },
      {
        "name": "customerEmail",
        "type": "string",
        "description": "The customer's email address, to send the invitation to."
      },
      {
        "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/calendars/YOUR_GOOGLE_CALENDAR_ID/events?sendUpdates=all"
      },
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Authorization",
          "value": "Bearer {{accessToken}}"
        }
      ],
      "body": "{\n  \"summary\": \"{{summary}}\",\n  \"description\": \"{{description}}\",\n  \"start\": {\n    \"dateTime\": \"{{startTime}}\",\n    \"timeZone\": \"{{timeZone}}\"\n  },\n  \"end\": {\n    \"dateTime\": \"{{endTime}}\",\n    \"timeZone\": \"{{timeZone}}\"\n  },\n  \"attendees\": [\n    {\n      \"email\": \"{{customerEmail}}\"\n    }\n  ]\n}",
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.