GHL Integrated Calendar tools not working
# support
w
The vapi GHL integration is successfully connected to my sub-account and is able to get contacts or create contacts just fine. The problem is with anything to do with calendars (check availability and create booking). It won't find availability in nearby dates requested, and it's incapable of creating bookings in the calendar. Sometimes it will find availability in a non-requested date much further in time (ie it will say there's something available in December 2025, when I requested June 27th 2025). The main issue seems to be that for some reason the tool calls are sending incorrect date timestamps and also using the wrong year (2023 seems to happen all the time, why I am not sure). I've tried with default tool message settings, or even adding the description for the tools to say "the year is 2025, assume any date used is in 2025" and this does not resolve the issue. Timezone capture does not seem to be a problem. Example call IDs: 9ff300ec-a119-46f0-96a0-b204f383611b a8d5ba0e-975f-4bef-8682-987ac27bd56d https://cdn.discordapp.com/attachments/1387867804597751949/1387869050574471259/image.png?ex=685ee947&is=685d97c7&hm=b990cef9b99fef6f4232214d112d8ddcc7357f02f0c559e56496c270b3cb5ba2&
Example tool call using wrong startDate [ 1687257600000] (june 20th 2023 when Im requesting for june 27th 2025)
k
Looking into it
w
Any updates?
m
I'm having calendar issues too, same thing apparently
Any updates?
w
I've seen many of the same types of tickets, time stamp goes go 2023 Im not sure why it would take weeks to resolve
s
Hey @Wes and @MegaG , I apologize for the delay. Please don't rely on the tickets tags; we haven't moved many of them from a long time ago, but we will do it now.
k
Hey @wes4024 and @melcat0, I am looking into the logs.
s
The issue is NOT in the Vapi codebase itself, but rather in how the AI model interprets and converts dates.
Add this generic prompt to your assistant's system instructions:
Copy code
IMPORTANT DATE HANDLING RULES:
- When users mention dates, ALWAYS use the current year unless they specify a different year
- If a user says "June 27th" or "tomorrow" or "next week", assume they mean the current year
- For calendar tool calls, be extremely careful with timestamp conversion
- Always double-check that your timestamps match the current year, not past years
- When converting dates to Unix timestamps (milliseconds), verify the year is correct
- If you're unsure about what year the user means, ask for clarification
- Never assume dates are from previous years unless explicitly told
@Wes @MegaG Try Few test calls and let me know how it goes for you.
w
I will test this week thank you
a
hi has this been fixed guy, im having the same issue with the date
m
I noticed that if you don't say to the AI to check the next week if there are no available spots in the current week, it will not check the next week at all
s
@Adam @MegaG Try Few test calls with this prompting change and let me know how it goes for you.
c
@Shubham Bajaj Hi, I'm having the similar problem with GHL and Vapi booking. eventhough my GHL calendar is empty, the Vapi is still saying that slots all have been booked. Tried for next week, next month and next year still the slot are full