Google Calendar freeBusy suddenly not working
# support
c
Hi all, I've been playing with some voice agents in vapi, trying to make an AI receptionist. Earlier in the day, it was working fine and seeing the booked events on the calendar. But after I've made some slight tweaks to the prompt(irrelevant to this task), it is just unable to get the proper availability. I'm pretty sure it's not the prompt, rather something wrong with the tool. This is what it returns, even when the calendar has events booked on it: { "busy": [], "free": [ { "start": "2025-11-19T09:00:00.000Z", "end": "2025-11-19T17:00:00.000Z" } ] } So it can book the appointment, it just books over the one already there. I triple checked the timezone, the calendar Id, the events being busy on Google Calendar, everything.
c
Hi there, Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST). We’ll get back to you as soon as possible during our normal business hours. If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly. Warm regards, Vapi Customer Support Team
m
@cristi There is a bug in the VAPI check_availability function for google calendars. The create_event tool happily overbooks appointments, and does no availability checking. The best way to debug this is to go into the "call logs", pick the call you know got bad data (usually the last test call you made), then look at the transcript and see what calls the agent made, and the responses it received from the tool. If the check_availability returned evreything free when you know it is busy, then you either hit the VAPI bug, or something in the call (a parameter) is wrong. The look at teh tool call, go to Logs, and filter for only the Tool calls. Each tool call is a pair of records, one for the call and one for the response from the tool. If you look at the call, you can see what parameters are passed in. Make sure they are correct. If all of that does not lead you to the solution, you might need more help.
c
I was able to create a prompt that works. I noticed that the tool always uses UTC timezone, so i created a prompt that converts the user's specified timezone into UTC for the request. I'm in PST timezone btw.
Copy code
## scheduling appointments
ask the user what day and time they want to schedule an appointment. assume all appointments are 1 hour long and are all in PST timezone (UTC-7). once you get the desired day and time for the appointment, convert the day and time to UTC+0 timezone equivalent, then use the 'google_check' tool to check if the desired day and time is available. if it is not available, apologize then suggest a different time. if it is available, tell the user it is available and ask if they would like to schedule the appointment for this time. if they say yes, use the 'google_schedule' tool to create the event for the day and time in the UTC+0 timezone equivalent. if they say no, then tell them it's okay and you understand their decision.
m
I have this same issue. Booking is fine, but it cannot properly check availability on the calendar.
m
There is a bug in the VAPI freeBusy tool. I spent hours last week debugging and proved to myself the endpoint simply does the wrong thing. If the LLM sends all parameters in UTC/Z format in the tool call you should get accurate answers. But you have to get the LLM to convert to UTC and from UTC for the agent to say things in local time. Would be much easier if VAPI fixed the freeBusy endpoint. Or they could hire me to fix it for them 😉
k
try using the prompt i provided above
m
Kyle, thank you, but the desired behavior is returning available times to the customer and then having them pick an open timeslot. Asking the caller to randomly pick times on what could be a busy schedule is not a good solution.
2 Views