Hey guys, hope you’re able to help out with this. I’m currently running a workflow that’s connected to vapi.ai to make an outbound call to a lead. The workflow works as it should. It extracts availability from my calendar, logs call data, and books the appointment.
The issue I’m facing is that the vapi agent takes forever to check availability using a vapi function named checkCalendarN8N. According to ChatGPT, it’s the calendar API call to retrieve calendar availability that’s taking time. Not entirely sure how to solve this to get the agent to check availability and retrieve it within maximum 5 seconds. Right now, it takes about 20-30 seconds, which is a massive issue.
The second issue I’m facing is that the agent sometimes claims that a time is unavailable when it isn’t, so the N8N workflow proceeds to schedule the requested time, but the agent says that the time is not available. This doesn’t happen all that often, but it happens enough for it to be an issue. I need the agent to be accurate and be able to read through the calendar availability properly. It’s like there’s no sync between the agent and the workflow. The workflow does one thing while the agent does the opposite. I’ll attach some images and my most recent JSON webhook output logging the call.
The difficult part about all of this is that there’s not even any errors involved, which is why I have no idea how to solve this or even what to solve.
Any help is appreciated. Let me know if more context is needed.