n8n webhook response not properly processed by VAPI AI assistant

I’m having trouble with my VAPI integration where the AI doesn’t process the data returned from my n8n automation workflow. I set up a tool function that calls an n8n webhook to check booking availability. The n8n workflow executes correctly and sends back available time slots, but VAPI’s AI assistant ignores this information completely.

Data I’m sending to VAPI:

{
  "function_name": "check_availability",
  "role": "tool_call_result", 
  "response": {
    "is_available": false,
    "suggested_times": [ "{{ $json.webhook_response.dates[0] }}" ]
  },
  "callId": "{{ $('HTTP Request').first().json.message.toolCalls[0].id }}"
}

What VAPI actually receives:

{
  "function_name": "check_availability",
  "role": "tool_call_result",
  "timestamp": 1750086569063,
  "response": "Success.",
  "callId": "call_ABC123DEF456",
  "duration": 24.924
}

As you can see, my detailed availability data gets replaced with just “Success.” I’ve tried different approaches like sending only the date string, restructuring the JSON format, and separating the response fields, but nothing works. Has anyone dealt with this VAPI response handling issue before?

Yeah, n8n webhook formatting with VAPI is awful. Had the same headache building voice assistants that pull real-time data from workflows.

It’s not just the JSON - n8n dumps execution metadata that VAPI can’t parse. Two systems fighting over response format.

Switched to Latenode for this exact problem. Native VAPI integration handles response formatting automatically. Same availability workflow, but it knows how to structure output for VAPI’s AI.

Webhook responses come through clean - no metadata mess. Your availability data hits VAPI exactly how the AI wants it, structured JSON or natural language.

Used it for booking systems, inventory checks, customer lookups with VAPI. Works every time without the n8n formatting nightmare.

Had this exact problem building a VAPI assistant that pulled from external APIs. VAPI expects tool responses in a super specific format and sanitizes anything that doesn’t match their schema. Your n8n webhook’s probably returning data fine, but VAPI’s middleware transforms it before the AI sees it. Here’s what fixed it for me: add a transformation step in n8n right before the webhook response. Don’t send structured JSON - format everything into one descriptive string with all the info. Turn your availability data into something like “Booking unavailable for requested slot. Alternative times: January 15th at 10:00 AM”. The AI handles natural language way better than parsing nested JSON. Also double-check your n8n webhook returns exactly what VAPI wants - their docs show the required response schema. Sometimes just adding an HTTP response node at the end with the properly formatted string fixes these formatting conflicts.

I’ve hit this VAPI webhook issue before. VAPI wants tool call results in a specific format, and when you send complex JSON in the response field, it gets flattened or turned into a basic status message. Ditch the nested structure. Put your actual data in the message content, not the response object. Instead of structured JSON with your availability data, send plain text the AI can work with. Something like ‘Booking not available for requested time. Suggested alternatives: 2024-01-15 10:00 AM’ works way better than complex JSON. Also double-check your n8n webhook setup - make sure you’re returning application/json and the Content-Type header is set right. VAPI’s pretty picky about webhook responses, especially with dynamic data from external workflows.

This happens because VAPI strips down complex nested objects when it processes your webhook response. It validates and sanitizes the data before sending it to the AI model, which usually turns detailed JSON into simple status messages like ‘Success’. I’ve hit this same issue when connecting VAPI to external APIs. The fix is to flatten everything into a single string. Don’t send nested JSON objects - just put all your availability data in one response string like: ‘response’: ‘Availability check completed. Status: not available. Alternative time slots: January 15th 10:00 AM’. Also check that your n8n workflow returns a proper 200 status code. VAPI handles non-200 responses differently and might fall back to generic success messages. Those timestamp and duration fields you’re seeing? That’s VAPI adding its own metadata while probably overwriting your custom response.

Vapi’s completely overriding your response payload. I’ve dealt with this same frustration - their webhook processing ignores custom JSON structures and forces their own format. Send everything as plain text in the response field instead of objects. So rather than nested JSON, just do “response”: “not available, try these times: jan 15 10am”. Vapi’s AI handles natural language much better than structured data anyway.