Skip to content

Commit b23e22f

Browse files
authored
Added docs for sheet, calendar, mcp (#290)
1 parent 8b27d08 commit b23e22f

File tree

8 files changed

+475
-28
lines changed

8 files changed

+475
-28
lines changed

fern/docs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,24 @@ navigation:
201201
path: advanced/sip/sip-zadarma.mdx
202202
- page: Plivo
203203
path: advanced/sip/sip-plivo.mdx
204+
204205
- section: Tools
205206
path: tools/introduction.mdx
206207
contents:
207208
- page: Default Tools
208209
path: tools/default-tools.mdx
209210
- page: Custom Tools
210211
path: tools/custom-tools.mdx
212+
- page: MCP Tool
213+
path: tools/mcp.mdx
211214
- page: Make & GHL Tools
212215
path: GHL.mdx
213216
- page: Google Calendar
214217
path: tools/google-calendar.mdx
218+
- page: Google Sheets
219+
path: tools/google-sheets.mdx
220+
- page: Slack
221+
path: tools/slack.mdx
215222

216223
- section: Knowledge Base
217224
path: knowledge-base/knowledge-base.mdx
-50 KB
Binary file not shown.
Loading
Binary file not shown.

fern/tools/google-calendar.mdx

Lines changed: 46 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
---
22
title: Google Calendar Integration
3-
subtitle: 'Connect your assistant to Google Calendar for seamless appointment scheduling.'
3+
subtitle: 'Connect your assistant to Google Calendar for seamless appointment scheduling and availability checking.'
44
slug: tools/google-calendar
55
---
66

7-
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.
7+
The Google Calendar integration allows your Vapi assistant to interact with Google Calendar in two ways:
8+
1. Create calendar events through voice commands
9+
2. Check calendar availability for scheduling
10+
11+
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.
812

913
## Prerequisites
1014

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

2832
<Note>
29-
The authorization process will request access to your Google Calendar to create and manage events.
33+
The authorization process will request access to your Google Calendar to create events and check availability.
3034
</Note>
3135

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

39-
### 2. Create Calendar Tool
43+
### 2. Create Calendar Tools
4044

41-
After connecting your Google Calendar account, create a new tool:
45+
After connecting your Google Calendar account, create the tools:
4246

4347
1. Go to **Dashboard** > **Tools** page
4448
2. Click the **Create Tool** button
4549
3. Select **Google Calendar** from the available options
46-
4. Provide a name for your tool
47-
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")
50+
4. Choose which tool(s) you want to create:
51+
- Google Calendar Create Event Tool
52+
- Google Calendar Check Availability Tool
53+
5. For each tool, provide a name and description explaining when it should be invoked
4854

4955
<Note>
50-
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.
56+
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.
5157
</Note>
5258

53-
<Frame caption="Create Calendar Tool">
54-
<img
55-
src="../static/images/tools/create-tool-menu.png"
56-
alt="Create Calendar Tool"
57-
/>
59+
<Frame caption="Create Calendar Tools">
5860
<img
59-
src="../static/images/tools/google-calendar-example.png"
61+
src="../static/images/tools/google-calendar-create.png"
6062
alt="Tool Configuration"
6163
/>
6264
</Frame>
6365

64-
### 3. Add Tool to Assistant
66+
### 3. Add Tools to Assistant
6567

66-
Now, add the calendar tool to your assistant:
68+
Now, add your chosen calendar tool(s) to your assistant:
6769

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

74-
<Frame caption="Add Tool to Assistant">
76+
<Frame caption="Add Tools to Assistant">
7577
<img
7678
src="../static/images/tools/assistant-select-google-calendar-tool.png"
77-
alt="Add Tool to Assistant"
79+
alt="Add Tools to Assistant"
7880
/>
7981
</Frame>
8082

81-
## Tool Configuration
83+
## Tool Configurations
84+
85+
### Google Calendar Create Event Tool
8286

83-
The Google Calendar tool uses the following fields to create events:
87+
This tool uses the following fields to create events:
8488

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

94+
### Google Calendar Check Availability Tool
95+
96+
This tool uses the following fields to check availability:
97+
98+
- `startDateTime`: The start of the time range to check
99+
- `endDateTime`: The end of the time range to check
100+
- `timeZone`: The timezone for the availability check
101+
90102
<Info>
91103
All datetime fields should be provided in ISO 8601 format.
92104
</Info>
93105

94106
## Example Usage
95107

96-
Here's how the tool can be used in your assistant's configuration:
108+
Here's how the tools can be used in your assistant's configuration:
97109

98110
```json
99111
{
@@ -103,14 +115,19 @@ Here's how the tool can be used in your assistant's configuration:
103115
"messages": [
104116
{
105117
"role": "system",
106-
"content": "You are a scheduling assistant. When users want to schedule an appointment, use the Google Calendar tool to create the event."
118+
"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}}"
107119
}
108120
],
109121
"tools": [
122+
{
123+
"type": "google.calendar.availability.check",
124+
"name": "checkAvailability",
125+
"description": "Use this tool to check calendar availability and use the America/Los_Angeles as default timezone."
126+
},
110127
{
111128
"type": "google.calendar.event.create",
112129
"name": "scheduleAppointment",
113-
"description": "Use this tool to schedule appointments and create calendar events"
130+
"description": "Use this tool to schedule appointments and create calendar events. Notes: - Use America/Los_Angeles as default timezone - All appointments are 30 mins."
114131
}
115132
]
116133
}
@@ -119,10 +136,11 @@ Here's how the tool can be used in your assistant's configuration:
119136

120137
## Best Practices
121138

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

127145
<CardGroup cols={2}>
128146
<Card

fern/tools/google-sheets.mdx

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: Google Sheets Integration
3+
subtitle: 'Connect your assistant to Google Sheets for seamless data entry.'
4+
slug: tools/google-sheets
5+
---
6+
7+
The Google Sheets integration allows your Vapi assistant to interact with Google Sheets in a simple way:
8+
1. Add new rows to existing Google Sheets
9+
10+
This enables your assistant to record information and add data to spreadsheets directly during phone calls.
11+
12+
<Note>
13+
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.
14+
</Note>
15+
16+
## Prerequisites
17+
18+
Before you can use the Google Sheets integration, you need to:
19+
1. Have a Google Sheets account
20+
2. Have access to the Vapi Dashboard
21+
3. Have an assistant created in Vapi
22+
4. Have a Google Sheet created and ready to receive data
23+
24+
## Setup Steps
25+
26+
### 1. Connect Google Sheets Account
27+
28+
First, you need to connect your Google Sheets account to Vapi:
29+
30+
1. Navigate to the Vapi Dashboard
31+
2. Go to **Providers Keys** > **Tools Provider** > **Google Sheets**
32+
3. Click the **Connect** button
33+
4. A Google authorization popup will appear
34+
5. Follow the prompts to authorize Vapi to access your Google Sheets
35+
36+
<Note>
37+
The authorization process will request access to your Google Sheets.
38+
</Note>
39+
40+
### 2. Create and Configure Sheets Tool
41+
42+
After connecting your Google Sheets account, create and configure the tool:
43+
44+
1. Go to **Dashboard** > **Tools** page
45+
2. Click the **Create Tool** button
46+
3. Select **Google Sheets** from the available options
47+
4. Choose the Google Sheets Add Row Tool
48+
5. Provide a name and description explaining when it should be invoked
49+
6. Configure the tool with the following required fields:
50+
- `spreadsheetId`: The ID of your Google Sheet
51+
- `range`: The sheet name or range (e.g., "Sheet1" or "Sheet1!A:Z")
52+
53+
<Note>
54+
To find your spreadsheet ID:
55+
1. Open your Google Sheet in a browser
56+
2. Look at the URL: `https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit`
57+
3. Copy the SPREADSHEET_ID portion (it's a long string of letters, numbers, and special characters)
58+
</Note>
59+
60+
<Note>
61+
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.
62+
</Note>
63+
64+
### 3. Add Tool to Assistant
65+
66+
Now, add the Google Sheets tool to your assistant:
67+
68+
1. Navigate to **Dashboard** > **Assistants** page
69+
2. Select your assistant
70+
3. Go to the **Tools** tab
71+
4. In the tools dropdown, select the Google Sheets tool
72+
5. Click **Publish** to save your changes
73+
74+
## Tool Configuration
75+
76+
### Google Sheets Add Row Tool
77+
78+
This tool uses the following fields to add data to your spreadsheet:
79+
80+
- `spreadsheetId`: The ID of your Google Sheet (found in the sheet's URL)
81+
- `range`: The range where the data should be added (e.g., "Sheet1" or "Sheet1!A:Z")
82+
- `values`: An array of values to be added as a new row
83+
84+
<Note>
85+
The range field can be specified in two ways:
86+
1. Just the sheet name (e.g., "Sheet1") - This will append to the next empty row
87+
2. Sheet name with range (e.g., "Sheet1!A:Z") - This will append to the specified range
88+
</Note>
89+
90+
## Example Usage
91+
92+
Here's how the tool can be used in your assistant's configuration:
93+
94+
```json
95+
{
96+
"model": {
97+
"provider": "openai",
98+
"model": "gpt-4",
99+
"messages": [
100+
{
101+
"role": "system",
102+
"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."
103+
}
104+
],
105+
"tools": [
106+
{
107+
"type": "google.sheets.row.append",
108+
"name": "addFeedback",
109+
"description": "Use this tool to add customer feedback to the feedback spreadsheet. Collect all required information (rating, comments, suggestions) before adding the row."
110+
}
111+
]
112+
}
113+
}
114+
```
115+
116+
## Best Practices
117+
118+
1. **Data Validation**: Ensure all data is properly formatted before adding to the spreadsheet
119+
2. **Error Handling**: Include fallback responses for cases where the tool fails
120+
3. **User Confirmation**: Always confirm with the user before adding data to the spreadsheet
121+
4. **Sheet Structure**: Be aware of the spreadsheet's structure and column requirements
122+
123+
<CardGroup cols={2}>
124+
<Card
125+
title="Need Help?"
126+
icon="question-circle"
127+
href="https://discord.gg/pUFNcf2WmH"
128+
>
129+
Join our Discord community for support with Google Sheets integration
130+
</Card>
131+
<Card
132+
title="API Reference"
133+
icon="book"
134+
href="/api-reference/tools/create"
135+
>
136+
View the complete API documentation for tools
137+
</Card>
138+
</CardGroup>

0 commit comments

Comments
 (0)