KRNage
04/22/2025, 3:34 PMVapi Support Bot
04/22/2025, 3:37 PMjson
{
"results": [
{
"toolCallId": "call_hJL6kSF0pOGjNtdQ",
"result": "The requested appointment time at 12:00 p.m. EST on April 21, 2025, is available for booking. Let me know if you wish to proceed with creating an event."
}
]
}
Notice that your response has an extra array wrapper [ ]
around the entire object. According to the [documentation on tool calling](https://docs.vapi.ai/tools-calling), the response must be a JSON object (not an array) with a "results" array inside it.
Here are some other things to check:
1. **Content-Type Header**: Make sure your n8n webhook response node has the Content-Type
header set to application/json
.
2. **Client Messages Configuration**: Verify that your assistant has both "tool-calls" and "tool-calls-result" checked in the clientMessages configuration.
3. **Serialization**: Ensure that the data is correctly serialized into a JSON string before being sent. The n8n webhook response node might be automatically adding the array wrapper.
4. **JSON Validation**: Use a tool like [jsonlint.com](https://jsonlint.com/) to validate your JSON response format.
5. **Manual Testing**: Try testing your webhook endpoint directly with a tool like Postman or cURL to see if the issue persists outside of n8n.
If you've confirmed the format is correct and you're still having issues, it might be worth checking your server logs for any debugging artifacts that could provide more insight into what's happening.Vapi Support Bot
04/22/2025, 3:37 PMKRNage
04/22/2025, 4:33 PM{
"results": [
{
"tool_call_id": "call_R1GU55uw4SYNKlNx",
"result": "There is an existing appointment for \"Bike Riding\" scheduled from 10:00 AM to 11:00 AM on April 25, 2025. This time slot is not available for a new appointment. If you have a different time in mind or need assistance with other dates, please let me know!"
}
]
}
Haiduk
04/22/2025, 5:15 PMKings_big💫
04/22/2025, 5:17 PMKRNage
04/22/2025, 7:15 PMKRNage
04/22/2025, 7:16 PMKyle Brunker
04/22/2025, 7:45 PMKRNage
04/22/2025, 7:50 PMKyle Brunker
04/22/2025, 8:58 PMKRNage
04/22/2025, 9:28 PMKRNage
04/22/2025, 10:18 PMKyle Brunker
04/22/2025, 10:21 PM