Thiago
05/08/2025, 1:34 AMVapi Support Bot
05/08/2025, 1:36 AMtoolCallId
that matches what was sent in the request:
json
{
"results": [
{
"toolCallId": "call_PddCTkgbV9UPsmf3dPrRmfMz",
"result": "Available slots: 10:00 AM, 10:30 AM, 11:00 AM, 11:30 AM, 12:00 PM, 12:30 PM, 3:30 PM, 4:00 PM, 4:30 PM"
}
]
}
Make sure line breaks in your result are properly escaped with \\n
.
Sources:
- [Vapi Tools Calling Documentation](https://docs.vapi.ai/tools-calling)
- [Discord Channel Tool Call ID Discussion](https://discord.com/channels/1211482211119796234/1325000684231196775)Vapi Support Bot
05/08/2025, 1:36 AMtoolCallId
that matches what was sent in the request:
json
{
"results": [
{
"toolCallId": "call_PddCTkgbV9UPsmf3dPrRmfMz",
"result": "Available slots: 10:00 AM, 10:30 AM, 11:00 AM, 11:30 AM, 12:00 PM, 12:30 PM, 3:30 PM, 4:00 PM, 4:30 PM"
}
]
}
Make sure line breaks in your result are properly escaped with \\n
.
Sources:
- [Vapi Tools Calling Documentation](https://docs.vapi.ai/tools-calling)
- [Discord Channel Tool Call ID Discussion](https://discord.com/channels/1211482211119796234/1325000684231196775)Vapi Support Bot
05/08/2025, 1:36 AMjson
{
"results": [
{
"toolCallId": "call_PddCTkgbV9UPsmf3dPrRmfMz",
"result": "Here are the available appointment slots for Thursday, May 8:\n- Morning: 10:00 AM, 10:30 AM, 11:00 AM, 11:30 AM\n- Afternoon: 12:00 PM, 12:30 PM, 3:30 PM, 4:00 PM, 4:30 PM"
}
]
}
Ensure line breaks are properly escaped with \n
and there's no nested JSON in the result field.
Sources:
- [Discord conversation about webhook response format](https://discord.com/channels/1211482211119796234/1325000684231196775)
- [Discord conversation about JSON formatting](https://discord.com/channels/1211482211119796234/1334658296291921920)Vapi Support Bot
05/08/2025, 1:36 AMjson
{
"results": [
{
"toolCallId": "call_PddCTkgbV9UPsmf3dPrRmfMz",
"result": "Here are the available appointment slots for Thursday, May 8:\n- Morning: 10:00 AM, 10:30 AM, 11:00 AM, 11:30 AM\n- Afternoon: 12:00 PM, 12:30 PM, 3:30 PM, 4:00 PM, 4:30 PM"
}
]
}
Ensure line breaks are properly escaped with \n
and there's no nested JSON in the result field.
Sources:
- [Discord conversation about webhook response format](https://discord.com/channels/1211482211119796234/1325000684231196775)
- [Discord conversation about JSON formatting](https://discord.com/channels/1211482211119796234/1334658296291921920)Kyle Brunker
05/08/2025, 2:03 AMThiago
05/08/2025, 5:43 AMKyle Brunker
05/10/2025, 3:37 AMThiago
05/10/2025, 6:54 AMKyle Brunker
05/11/2025, 1:33 AMresult
field must be a string type (not a direct JSON object)
2\. The string should be a single line without line breaks
3\. If you're returning JSON data, it needs to be properly stringified
Your example showed multi-line text with line breaks, which would cause issues in VAPI's processing. When VAPI attempts to parse or process this multi-line result, it likely encounters errors that prevent it from properly handling the response.
For your n8n workflow, update the "Respond to Webhook" node to:
1\. Format your data as a proper JSON object
2\. Use JSON.stringify() to convert it to a single-line string
3\. Ensure no manual line breaks are inserted
4\. Return this string in the result
field
This is a common issue with webhook integrations that's often overlooked but can completely break the data flow.Thiago
05/11/2025, 3:45 AM