-
Notifications
You must be signed in to change notification settings - Fork 66
Appointment scheduling example (using workflows) #429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
goosewin
wants to merge
2
commits into
feature/customer-support-hotline-example
from
feature/appointment-scheduling-example
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| --- | ||
| title: Appointment Scheduling Agent 📅 | ||
| subtitle: Build an AI agent using workflows to schedule appointments via phone calls with Google Calendar integration. | ||
| slug: examples/appointment-scheduling | ||
| description: A comprehensive guide to building a voice AI agent that handles appointment scheduling with Google Calendar integration. | ||
| --- | ||
|
|
||
| By following this example, you'll learn how to: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: overview section to keep it consistent |
||
|
|
||
| * Create a voice AI agent using workflows to handle inbound appointment scheduling calls. | ||
| * Build custom tools to check calendar availability and book appointments. | ||
| * Integrate with Google Calendar for real-time scheduling. | ||
| * Create an automated test suite to ensure your scheduling agent works correctly. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| * A [Vapi account](https://dashboard.vapi.ai/). | ||
| * A Google Account (for Google Calendar integration). | ||
|
|
||
| --- | ||
|
|
||
| ## 1. Configuring Google Calendar Integration | ||
|
|
||
| <Steps> | ||
| <Step title="Open the Vapi Dashboard"> | ||
| Go to [dashboard.vapi.ai](https://dashboard.vapi.ai) and log in to your account. | ||
| </Step> | ||
| <Step title="Navigate to the Workflows section"> | ||
| Click `Workflows` in the left sidebar. | ||
| </Step> | ||
| <Step title="Create a new workflow"> | ||
| - Click `Create Workflow`. | ||
| - Change workflow name to `Appointment Scheduling Workflow`. | ||
| </Step> | ||
| <Step title="Configure your workflow"> | ||
| - Update first step to | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| <video autoPlay loop muted src="../static/videos/appointment-scheduling/create-workflow.mp4" type="video/mp4" style={{ aspectRatio: '16 / 9', width: '100%' }} /> | ||
|
|
||
| --- | ||
|
|
||
| ## 2. Creating Tools for Use in Workflows | ||
|
|
||
| <Steps> | ||
| <Step title="Navigate to Tools"> | ||
| Open your [dashboard.vapi.ai](https://dashboard.vapi.ai) and click `Tools` in the left sidebar. | ||
| </Step> | ||
| <Step title="Create the availability checking tool"> | ||
| - Click `Create Tool`. | ||
| - Select `Function` as your tool type. | ||
| - Change tool name to `check_availability`. | ||
| - Add the following function description: | ||
|
|
||
| ```txt title="Function Description" wordWrap | ||
| Check calendar availability for a specific date and time range. Use this before attempting to book any appointment. | ||
| ``` | ||
|
|
||
| - Save the tool. | ||
| </Step> | ||
| <Step title="Create the haircut appointment booking tool"> | ||
| - Click `Create Tool`. | ||
| - Select `Function` as your tool type. | ||
| - Change tool name to `book_appointment`. | ||
| - Add the following function description: | ||
|
|
||
| ```txt title="Function Description" wordWrap | ||
| Book an appointment after confirming availability. Only use this after checking availability first. | ||
| ``` | ||
|
|
||
| - Save the tool. | ||
| </Step> | ||
| <Step title="Create the consult appointment booking tool"> | ||
| - Click `Create Tool`. | ||
| - Select `Function` as your tool type. | ||
| - Change tool name to `book_appointment`. | ||
| - Add the following function description: | ||
|
|
||
| ```txt title="Function Description" wordWrap | ||
| Book an appointment after confirming availability. Only use this after checking availability first. | ||
| ``` | ||
|
|
||
| - Save the tool. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| <video autoPlay loop muted src="../static/videos/appointment-scheduling/create-tools.mp4" type="video/mp4" style={{ aspectRatio: '16 / 9', width: '100%' }} /> | ||
|
|
||
| --- | ||
|
|
||
| ## 3. Creating an Appointment Scheduling Workflow | ||
|
|
||
| <Steps> | ||
| <Step title="Open the Vapi Dashboard"> | ||
| Go to [dashboard.vapi.ai](https://dashboard.vapi.ai) and log in to your account. | ||
| </Step> | ||
| <Step title="Navigate to the Workflows section"> | ||
| Click `Workflows` in the left sidebar. | ||
| </Step> | ||
| <Step title="Create a new workflow"> | ||
| - Click `Create Workflow`. | ||
| - Change workflow name to `Appointment Scheduling Workflow`. | ||
| </Step> | ||
| <Step title="Configure your workflow"> | ||
| - Update first step to | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| <video autoPlay loop muted src="../static/videos/appointment-scheduling/create-workflow.mp4" type="video/mp4" style={{ aspectRatio: '16 / 9', width: '100%' }} /> | ||
|
|
||
| --- | ||
|
|
||
| ## 4. Assigning a phone number to a workflow | ||
|
|
||
| <Steps> | ||
| <Step title="Navigate to Phone Numbers"> | ||
| Open your [dashboard.vapi.ai](https://dashboard.vapi.ai) and click `Phone Numbers` in the left sidebar. | ||
| </Step> | ||
| <Step title="Create a new phone number"> | ||
| - Click `Create Phone Number`. | ||
| - Stick with `Free Vapi Number`. | ||
| - Enter your preferred area code (e.g. `415`). | ||
| </Step> | ||
| <Step title="Configure the phone number"> | ||
| - Set the `Phone Number Name` to `Appointment Scheduling Line`. | ||
| - Under `Inbound Settings` find `Assistant` dropdown and select `Sophia` from the list. | ||
| - Changes are saved automatically. | ||
| </Step> | ||
| </Steps> | ||
|
|
||
| <video autoPlay loop muted src="../static/videos/appointment-scheduling/assign-phone-number.mp4" type="video/mp4" style={{ aspectRatio: '16 / 9', width: '100%' }} /> | ||
|
|
||
| --- | ||
|
|
||
| ## Next Steps | ||
|
|
||
| Congratulations! You've built a comprehensive appointment scheduling assistant that can handle inbound calls, check calendar availability, and book appointments with proper confirmation. | ||
|
|
||
| Consider reading the following guides to further enhance your assistant: | ||
|
|
||
| * [**GoHighLevel Integration**](https://docs.vapi.ai/tools/go-high-level) - Connect with GoHighLevel for advanced CRM and calendar management. | ||
| * [**Google Calendar Integration**](https://docs.vapi.ai/tools/google-calendar) - Integrate directly with Google Calendar for real-time availability. | ||
| * [**Knowledge Bases**](https://docs.vapi.ai/knowledge-base/) - Add FAQ capabilities for common scheduling questions. | ||
| * [**Custom Keywords**](https://docs.vapi.ai/customization/custom-keywords) - Set up keywords for quick actions like "cancel" or "reschedule". | ||
|
|
||
| <Callout> | ||
| Need help? Chat with the team on our [Discord](https://discord.com/invite/pUFNcf2WmH) or mention us on [X/Twitter](https://x.com/Vapi_AI). | ||
| </Callout> | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove emoji from title and make description a bit shorter