How to intergrate google calendar tools
# support
v
when creating an assistant (one for each of my users) using the API. how do I give it the ability to read/write events from their google calendar assuming they've already been authenticated using OAuth
v
To enable each assistant to read/write Google Calendar events for a user (after OAuth), add the Google Calendar tools to the assistant's configuration and ensure the correct OAuth credentials are used. Example payload:
Copy code
json
{
  "tools": [
    {
      "type": "google.calendar.event.create",
      "name": "scheduleAppointment",
      "description": "Use this tool to schedule appointments and create calendar events."
    },
    {
      "type": "google.calendar.availability.check",
      "name": "checkAvailability",
      "description": "Use this tool to check calendar availability."
    }
  ]
}
Note: You must ensure the assistant uses the right user's OAuth token for calendar actions. The docs do not specify how to programmatically associate tokens per assistant, so you may need to manage this mapping in your backend. [See Google Calendar integration docs](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
v
@Vapi Support Bot could you give me a step by step?
v
Step-by-step to enable Google Calendar read/write for each assistant: 1. In the Vapi Dashboard, connect Google Calendar under Provider Keys. 2. Create the Google Calendar tools ("Create Event" and "Check Availability") in the Tools section. 3. When creating each assistant via the API, include these tools in the
tools
array:
Copy code
json
   {
     "tools": [
       {
         "type": "google.calendar.event.create",
         "name": "scheduleAppointment",
         "description": "Use this tool to schedule appointments and create calendar events."
       },
       {
         "type": "google.calendar.availability.check",
         "name": "checkAvailability",
         "description": "Use this tool to check calendar availability."
       }
     ]
   }
4. Important: You must ensure your backend maps each assistant to the correct user's OAuth token for calendar actions, as the docs do not specify a built-in way to do this programmatically. For more details, see the [Google Calendar integration documentation](https://docs.vapi.ai/tools/google-calendar). Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
v
@Vapi Support Bot how do I do step 4?
k
Hey VapiUser, checking if this is resolved/solved for you?
v
@Shubham Bajaj sent you a dm
v
To integrate Google Calendar tools for each assistant and enable them to read/write events for individual users, you should: 1. Connect Google Calendar in the Vapi Dashboard under Provider Keys. 2. Create the Google Calendar tools (like "Create Event" and "Check Availability") in the Tools section. 3. When creating each assistant via the API, include these tools in the
tools
array
of the assistant's configuration. 4. Store each user's OAuth token in your backend and map it to their assistant. When an assistant needs to access Google Calendar, your backend should retrieve the correct token for that user and use it for the API call. For example:
Copy code
python
# Pseudocode
user_token = get_token_for_assistant(assistant_id)
calendar_api_call(token=user_token, ...)
Note: Vapi does not provide a built-in way to associate tokens per assistant, so this mapping and secure storage must be managed in your backend logic. If you need to handle token storage, retrieval, or refreshing, you'll need to implement those details according to your backend's requirements. Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
a
Our users will not see vapi dashboard. There is no way they can put their google account in provider keys. Right? Hence the confusion in this is how can we use credentials on the api to pass in the users credentials for google calendar
v
You are correct: Based on the documentation, there is currently no way for end-users to connect their Google accounts to Vapi via the API—connection must be done through the Vapi Dashboard under Provider Keys. Would you like guidance on how to implement your own OAuth flow and token management in your backend to enable this for your users? [See Google Calendar integration docs for reference.](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
a
I have gone through the documents and api references. I know there has to be a way for us to integrate the internal google calendar tool. I just need to know what parameters I have to pass in the credentials and exactly how to go with the connection of google calendar through the api.
v
Vapi does not support passing user-specific Google Calendar credentials via the API. All Google Calendar tool actions use the account connected in the Vapi Dashboard under Provider Keys. If you need per-user calendar access, you must implement your own OAuth flow and interact with the Google Calendar API directly from your backend, using the user's token. There are no API parameters for injecting user credentials into Vapi's built-in Google Calendar tools. [See official documentation for details.](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
v
Vapi does not currently support passing user-specific Google Calendar credentials via the API using the
credentials
or
authorizationId
fields.
All Google Calendar actions use the account connected in the Vapi Dashboard under Provider Keys. If you need per-user access, you must handle OAuth and Google Calendar API calls in your own backend, not through Vapi's built-in tools. There is no documented way to use
credentials
or
authorizationId
for Google Calendar integration at this time.
[See official documentation for details.](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)
Vapi does not support passing user-specific Google Calendar credentials via the API. The
credentials
and
authorizationId
fields are not documented for use with Google Calendar user tokens—**all calendar actions use the account connected in the Vapi Dashboard under Provider Keys**. If you need per-user calendar access, you must implement your own OAuth flow and interact with the Google Calendar API directly from your backend. [See official documentation for details.](https://docs.vapi.ai/tools/google-calendar) Source: - [Google Calendar Integration Documentation](https://docs.vapi.ai/tools/google-calendar)