Hi Everyone…I’m building an AI voice appointment scheduling system for a dental clinic using VAPI and Calendly, but I’ve encountered a challenge. When a user calls, I ask them which day they’d like to schedule a dental appointment. For example, if they say “Monday at 10:00 AM,” I need to:
- How can I check the availability of all time slots from Calendly and see if Monday at 10:00 AM is available or not? I want to return a response like “Yes, it is available” or “No, it is not available.”
- If the slot is not available, I want to offer two alternate available times for Monday.
- If the slot is available, I will call the setMeeting function and book the meeting.
My biggest issue is 1 and 2. I have used calendly API to get the user busy times as a collection in make ( see screenshot) but I am not sure how to search the collection to see whether the time Monday at 10 AM exists in that or not.
Could you help me figure out how to achieve this? I would really appreciate your guidance.
Thank you,
Sandeep