Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,24 @@ navigation:
path: advanced/sip/sip-zadarma.mdx
- page: Plivo
path: advanced/sip/sip-plivo.mdx

- section: Tools
path: tools/introduction.mdx
contents:
- page: Default Tools
path: tools/default-tools.mdx
- page: Custom Tools
path: tools/custom-tools.mdx
- page: MCP Tool
path: tools/mcp.mdx
- page: Make & GHL Tools
path: GHL.mdx
- page: Google Calendar
path: tools/google-calendar.mdx
- page: Google Sheets
path: tools/google-sheets.mdx
- page: Slack
path: tools/slack.mdx

- section: Knowledge Base
path: knowledge-base/knowledge-base.mdx
Expand Down
Binary file removed fern/static/images/tools/create-tool-menu.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
74 changes: 46 additions & 28 deletions fern/tools/google-calendar.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
---
title: Google Calendar Integration
subtitle: 'Connect your assistant to Google Calendar for seamless appointment scheduling.'
subtitle: 'Connect your assistant to Google Calendar for seamless appointment scheduling and availability checking.'
slug: tools/google-calendar
---

The Google Calendar integration allows your Vapi assistant to create calendar events through voice commands. This enables your assistant to schedule appointments, meetings, and other calendar events directly during phone calls.
The Google Calendar integration allows your Vapi assistant to interact with Google Calendar in two ways:
1. Create calendar events through voice commands
2. Check calendar availability for scheduling

This enables your assistant to schedule appointments, meetings, and other calendar events directly during phone calls, as well as check when you're available for meetings.

## Prerequisites

Expand All @@ -26,7 +30,7 @@ First, you need to connect your Google Calendar account to Vapi:
5. Follow the prompts to authorize Vapi to access your Google Calendar

<Note>
The authorization process will request access to your Google Calendar to create and manage events.
The authorization process will request access to your Google Calendar to create events and check availability.
</Note>

<Frame caption="Connect Google Calendar">
Expand All @@ -36,64 +40,72 @@ First, you need to connect your Google Calendar account to Vapi:
/>
</Frame>

### 2. Create Calendar Tool
### 2. Create Calendar Tools

After connecting your Google Calendar account, create a new tool:
After connecting your Google Calendar account, create the tools:

1. Go to **Dashboard** > **Tools** page
2. Click the **Create Tool** button
3. Select **Google Calendar** from the available options
4. Provide a name for your tool
5. Add a description explaining when this tool should be invoked (e.g., "Use this tool when the user wants to schedule an appointment or create a calendar event")
4. Choose which tool(s) you want to create:
- Google Calendar Create Event Tool
- Google Calendar Check Availability Tool
5. For each tool, provide a name and description explaining when it should be invoked

<Note>
The description field is crucial as it helps the AI model understand when and how to use the tool. Be specific about the scenarios and conditions when the tool should be invoked.
The description field is crucial as it helps the AI model understand when and how to use each tool. Be specific about the scenarios and conditions when each tool should be invoked.
</Note>

<Frame caption="Create Calendar Tool">
<img
src="../static/images/tools/create-tool-menu.png"
alt="Create Calendar Tool"
/>
<Frame caption="Create Calendar Tools">
<img
src="../static/images/tools/google-calendar-example.png"
src="../static/images/tools/google-calendar-create.png"
alt="Tool Configuration"
/>
</Frame>

### 3. Add Tool to Assistant
### 3. Add Tools to Assistant

Now, add the calendar tool to your assistant:
Now, add your chosen calendar tool(s) to your assistant:

1. Navigate to **Dashboard** > **Assistants** page
2. Select your assistant
3. Go to the **Functions** tab
4. In the tools dropdown, select your newly created calendar tool
3. Go to the **Tools** tab
4. In the tools dropdown, select the calendar tool(s) you want to use
5. Click **Publish** to save your changes

<Frame caption="Add Tool to Assistant">
<Frame caption="Add Tools to Assistant">
<img
src="../static/images/tools/assistant-select-google-calendar-tool.png"
alt="Add Tool to Assistant"
alt="Add Tools to Assistant"
/>
</Frame>

## Tool Configuration
## Tool Configurations

### Google Calendar Create Event Tool

The Google Calendar tool uses the following fields to create events:
This tool uses the following fields to create events:

- `summary`: The title or description of the calendar event
- `startDateTime`: The start date and time of the event
- `endDateTime`: The end date and time of the event
- `timeZone`: The timezone for the event

### Google Calendar Check Availability Tool

This tool uses the following fields to check availability:

- `startDateTime`: The start of the time range to check
- `endDateTime`: The end of the time range to check
- `timeZone`: The timezone for the availability check

<Info>
All datetime fields should be provided in ISO 8601 format.
</Info>

## Example Usage

Here's how the tool can be used in your assistant's configuration:
Here's how the tools can be used in your assistant's configuration:

```json
{
Expand All @@ -103,14 +115,19 @@ Here's how the tool can be used in your assistant's configuration:
"messages": [
{
"role": "system",
"content": "You are a scheduling assistant. When users want to schedule an appointment, use the Google Calendar tool to create the event."
"content": "You are a scheduling assistant. When users want to schedule an appointment, first check their availability using the Check Availability tool, then use the Create Event tool to schedule the event if they're available.\n\n- Gather date and time range to check availability.\n- To book an appointment, gather the purpose of the appointment, ex: general checkup, dental cleaning and etc.\n\nNotes\n- Use the purpose as summary for booking appointment.\n- Current date: {{date}}\n- Current time: {{time}}"
}
],
"tools": [
{
"type": "google.calendar.availability.check",
"name": "checkAvailability",
"description": "Use this tool to check calendar availability and use the America/Los_Angeles as default timezone."
},
{
"type": "google.calendar.event.create",
"name": "scheduleAppointment",
"description": "Use this tool to schedule appointments and create calendar events"
"description": "Use this tool to schedule appointments and create calendar events. Notes: - Use America/Los_Angeles as default timezone - All appointments are 30 mins."
}
]
}
Expand All @@ -119,10 +136,11 @@ Here's how the tool can be used in your assistant's configuration:

## Best Practices

1. **Clear Instructions**: Provide clear instructions in your assistant's system message about when to use the calendar tool
2. **Error Handling**: Include fallback responses for cases where the calendar tool fails
3. **Time Zone Awareness**: Always specify the correct timezone for events
1. **Clear Instructions**: Provide clear instructions in your assistant's system message about when to use each calendar tool
2. **Error Handling**: Include fallback responses for cases where either calendar tool fails
3. **Time Zone Awareness**: Always specify the correct timezone for events and availability checks
4. **Event Details**: Ensure all required fields are properly filled when creating events
5. **Availability Flow**: Check availability before attempting to schedule events to avoid conflicts

<CardGroup cols={2}>
<Card
Expand Down
138 changes: 138 additions & 0 deletions fern/tools/google-sheets.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
title: Google Sheets Integration
subtitle: 'Connect your assistant to Google Sheets for seamless data entry.'
slug: tools/google-sheets
---

The Google Sheets integration allows your Vapi assistant to interact with Google Sheets in a simple way:
1. Add new rows to existing Google Sheets

This enables your assistant to record information and add data to spreadsheets directly during phone calls.

<Note>
The Google Sheets integration currently only supports adding new rows to spreadsheets. It does not support reading from or modifying existing data in the spreadsheet.
</Note>

## Prerequisites

Before you can use the Google Sheets integration, you need to:
1. Have a Google Sheets account
2. Have access to the Vapi Dashboard
3. Have an assistant created in Vapi
4. Have a Google Sheet created and ready to receive data

## Setup Steps

### 1. Connect Google Sheets Account

First, you need to connect your Google Sheets account to Vapi:

1. Navigate to the Vapi Dashboard
2. Go to **Providers Keys** > **Tools Provider** > **Google Sheets**
3. Click the **Connect** button
4. A Google authorization popup will appear
5. Follow the prompts to authorize Vapi to access your Google Sheets

<Note>
The authorization process will request access to your Google Sheets.
</Note>

### 2. Create and Configure Sheets Tool

After connecting your Google Sheets account, create and configure the tool:

1. Go to **Dashboard** > **Tools** page
2. Click the **Create Tool** button
3. Select **Google Sheets** from the available options
4. Choose the Google Sheets Add Row Tool
5. Provide a name and description explaining when it should be invoked
6. Configure the tool with the following required fields:
- `spreadsheetId`: The ID of your Google Sheet
- `range`: The sheet name or range (e.g., "Sheet1" or "Sheet1!A:Z")

<Note>
To find your spreadsheet ID:
1. Open your Google Sheet in a browser
2. Look at the URL: `https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit`
3. Copy the SPREADSHEET_ID portion (it's a long string of letters, numbers, and special characters)
</Note>

<Note>
The description field is crucial as it helps the AI model understand when and how to use the tool. Be specific about the scenarios and conditions when the tool should be invoked.
</Note>

### 3. Add Tool to Assistant

Now, add the Google Sheets tool to your assistant:

1. Navigate to **Dashboard** > **Assistants** page
2. Select your assistant
3. Go to the **Tools** tab
4. In the tools dropdown, select the Google Sheets tool
5. Click **Publish** to save your changes

## Tool Configuration

### Google Sheets Add Row Tool

This tool uses the following fields to add data to your spreadsheet:

- `spreadsheetId`: The ID of your Google Sheet (found in the sheet's URL)
- `range`: The range where the data should be added (e.g., "Sheet1" or "Sheet1!A:Z")
- `values`: An array of values to be added as a new row

<Note>
The range field can be specified in two ways:
1. Just the sheet name (e.g., "Sheet1") - This will append to the next empty row
2. Sheet name with range (e.g., "Sheet1!A:Z") - This will append to the specified range
</Note>

## Example Usage

Here's how the tool can be used in your assistant's configuration:

```json
{
"model": {
"provider": "openai",
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You are a customer feedback assistant. After each customer service call, collect feedback using the following process:\n\n1. Ask the customer if they would like to provide feedback\n2. If yes, ask for their rating (1-5 stars)\n3. Ask for specific comments about their experience\n4. Ask for any suggestions for improvement\n5. Confirm the feedback before adding it to the spreadsheet\n\nUse the Add Row tool to record the feedback with the following columns:\n- Timestamp\n- Rating (1-5)\n- Comments\n- Suggestions\n\nAlways be polite and thank the customer for their feedback."
}
],
"tools": [
{
"type": "google.sheets.row.append",
"name": "addFeedback",
"description": "Use this tool to add customer feedback to the feedback spreadsheet. Collect all required information (rating, comments, suggestions) before adding the row."
}
]
}
}
```

## Best Practices

1. **Data Validation**: Ensure all data is properly formatted before adding to the spreadsheet
2. **Error Handling**: Include fallback responses for cases where the tool fails
3. **User Confirmation**: Always confirm with the user before adding data to the spreadsheet
4. **Sheet Structure**: Be aware of the spreadsheet's structure and column requirements

<CardGroup cols={2}>
<Card
title="Need Help?"
icon="question-circle"
href="https://discord.gg/pUFNcf2WmH"
>
Join our Discord community for support with Google Sheets integration
</Card>
<Card
title="API Reference"
icon="book"
href="/api-reference/tools/create"
>
View the complete API documentation for tools
</Card>
</CardGroup>
Loading