Calendar Secretary Agent - Complete Tutorial
In this tutorial, you'll learn to create a complete Secretary Agent for a dental office, capable of:
- Querying availability in Google Calendar
- Scheduling appointments directly via WhatsApp
- Performing post-service analysis
- Automatically recording interactions in Google Sheets
Prerequisites
- Configured SipPulse AI account
- Configured WhatsApp Business (see guide)
- Google account with active Google Calendar
- Make.com account
- Google Sheets for data recording
1. Setting Up Automations in Make
1.1 Webhook to Query Availability
First, let's create a webhook that queries available times in the calendar.
Access Make and create a new scenario
Add a Webhook module as trigger:
- Click Create a webhook
- Name it
query_dentist_calendar
- Copy the generated URL (will be used in the agent)
Configure Google Calendar:
- Add module Google Calendar → Search Events
- Configure Google credentials
- Important parameters:
Calendar ID: primary (or specific office ID) Time Min: {{query.start_date}} (comes from webhook) Time Max: {{query.end_date}} (comes from webhook) Max Results: 50
Processing and Response:
- Add module Tools → Set Variables to process data
- Add module Webhooks → Webhook Response to return JSON:
json
{
"busy_times": [
{
"start": "2024-01-15T09:00:00",
"end": "2024-01-15T10:00:00",
"title": "Appointment - John Silva"
}
],
"available_times": [
"09:00", "10:00", "11:00", "14:00", "15:00", "16:00"
],
"queried_date": "2024-01-15"
}
1.2 Webhook to Schedule Appointment
Create another scenario in Make
Add Webhook trigger:
- Name:
schedule_dentist_appointment
- Copy the URL
- Name:
Configure Google Calendar Create Event:
- Module: Google Calendar → Create an Event
- Parameters:
Calendar ID: primary Summary: Appointment - {{query.patient_name}} Start Date: {{query.start_date}} End Date: {{query.end_date}} Description: Scheduled via WhatsApp Location: Dr. Silva's Office
Confirmation response:
json
{
"success": true,
"event_id": "{{google_calendar_event_id}}",
"message": "Appointment successfully scheduled for {{query.patient_name}}"
}
2. Creating the Secretary Agent
2.1 Basic Configuration
- Access Agents on the SipPulse AI platform
- Click "New Agent"
- Configure profile:
- Name: Dr. Silva's Secretary
- Description: Virtual assistant for dental appointment scheduling
- Model: GPT-4.1 (recommended for complex tasks)
2.2 System Instructions
markdown
# IDENTITY
You are Marina, the virtual secretary for Dr. Silva's dental office. You are professional, caring, and expert in scheduling.
# PERSONALITY
- Always polite and empathetic
- Efficient in scheduling
- Well-versed in office procedures
- Patient with client questions
- Proactive in offering solutions
# OFFICE HOURS
- Monday to Friday: 8am to 6pm
- Saturday: 8am to 12pm
- Sunday: Closed
- Appointment duration: 30 minutes each
- Lunch break: 12pm to 2pm
# AVAILABLE PROCEDURES
- Routine consultation (30 min)
- Cleaning (45 min)
- Root canal treatment (60 min)
- Extraction (45 min)
- Whitening (60 min)
# SCHEDULING FLOW
1. Greet the patient and ask for their name
2. Identify the desired type of procedure
3. Query availability using the query_calendar tool
4. Present available time options
5. Confirm details with the patient
6. Schedule the appointment using the schedule_appointment tool
7. Provide important information (address, recommendations)
# IMPORTANT RULES
- Always confirm full name and phone before scheduling
- Don't schedule outside office hours
- For long procedures (>45min), preferably in the morning
- Always ask if it's a first visit to the office
- Offer rescheduling if no time available on requested day
# OFFICE INFORMATION
- Address: Flower Street, 123 - Downtown
- Phone: (11) 99999-9999
- Dr. Silva - CRO 12345
- Free parking available
- Accepts card and PIX
# FINAL INSTRUCTIONS
- For dental emergencies, advise calling directly
- Always end by asking if there are any other questions
- Be clear about cancellation policy (24h advance notice)
2.3 Enabling Tools
Tool 1: Query Calendar
- Click "+ New tool"
- Select "API Integration"
- Configure:
- Name:
query_calendar
- Description: Queries available times in the office's Google Calendar
- Structure:json
{ "start_date": "string", "end_date": "string" }
- URL: Paste the Make webhook URL (query)
- Method: GET
- Mode: Query Parameters
- Name:
Tool 2: Schedule Appointment
- Add another tool
- Configure:
- Name:
schedule_appointment
- Description: Schedules a new appointment in Google Calendar
- Structure:json
{ "patient_name": "string", "phone": "string", "procedure": "string", "start_date": "string", "end_date": "string" }
- URL: Paste the Make webhook URL (schedule)
- Method: POST
- Mode: Body
- Name: