Hi @rudolftoby
This sounds like a mismatch between what VAPI thinks happened and what actually happened in n8n. Based on your description, here’s what could be causing the issue and how to troubleshoot or fix it:
Likely Cause: Timing or Misaligned Response Flow
VAPI probably responds before the booking process finishes in n8n, or it doesn’t correctly parse the final status of the workflow. So even if n8n successfully books the appointment, VAPI might have already defaulted to a “no slots” response because it didn’t receive the right confirmation in time.
How to Troubleshoot
- Check What Data VAPI Receives from n8n
Review the webhook response in your n8n workflow.
Is the webhook returning JSON with a field like “status”: “success” or “slotBooked”: true?
If not, VAPI may interpret that as a failed attempt.
- Verify the Webhook Node Placement
Ensure the Webhook Response node is placed after the booking logic — not before.
If your response is sent too early, it won’t include the final booking status.
- Add Clear Output
Make the final node in the workflow return a structured payload like:
{
“bookingStatus”: “success”,
“slotTime”: “2025-03-22T10:00:00Z”
}
VAPI should be configured to read this and determine the correct response.
- Check VAPI’s Fallback Logic
VAPI may default to “no slot available” unless it sees a very specific keyword or structure in the webhook response.
Double-check the VAPI documentation or config to ensure it’s looking for the right field (e.g. slotBooked: true or bookingStatus: “confirmed”).
- Introduce Logging in n8n
Add a Set node with debug info or a Function node to log the state before the response goes out. Helps track what data VAPI sees.
Suggestion: Sync with VAPI Flow
You can add a decision node in n8n before the Webhook Response that:
Checks if a slot was successfully booked.
Routes to two different Webhook Responses:
One saying “Booking confirmed for X”
One saying “No slots available”
That way, VAPI always gets a clean and reliable signal to respond with.
Would you be able to share the workflow JSON and some logs? That’ll help pinpoint the exact spot to tweak.