o
@Vapi My vapi tool is not able to get the response passed from webhook Webhook response: { "results": [ { "toolCallId": call_VqUkbjAKfu0fqlemhkaQrEpS, "result": 1. Do you require assistance with IT infrastructure planning and optimization? 2. Are you currently facing challenges with cybersecurity or data protection? 3. Do you need help implementing cloud-based solutions for your business operations? 4. Is your organization looking for support in integrating AI or machine learning into your workflows? 5. Would you like to improve the scalability and performance of your existing IT systems? } ] } Status200 Vapi Logs: { "name": "getQ", "role": "tool_call_result", "time": 1734428588962, "result": "No result returned.", "toolCallId": "call_VqUkbjAKfu0fqlemhkaQrEpS", "secondsFromStart": 21.084 }
v
@Om It seems like there might be a discrepancy between the expected response format that VAPI is looking for and the format that your webhook is providing. The VAPI is expecting a result for each tool call, but the result in the webhook response appears to be a multi-line string which might not be parsed correctly by VAPI. To resolve this issue, you may need to adjust the format of the response from your webhook to match the expected format of VAPI. Each result should be a separate entry in the "results" array, with its own "toolCallId" and "result" fields. If you have control over the webhook, try formatting the response like this:
Copy code
json
{
    "results": [
        {
            "toolCallId": "call_VqUkbjAKfu0fqlemhkaQrEpS",
            "result": "Do you require assistance with IT infrastructure planning and optimization?"
        },
        {
            "toolCallId": "call_VqUkbjAKfu0fqlemhkaQrEpS",
            "result": "Are you currently facing challenges with cybersecurity or data protection?"
        },
        // ... additional results for each question
    ]
}
If each question is meant to be a separate result, they should each have a unique "toolCallId". If they are all part of one result, then ensure that the "result" field contains a data type that VAPI can parse correctly, such as a single string or a JSON object. If you do not have control over the webhook, please reach out to the webhook provider to discuss the expected response format and see if they can make the necessary adjustments. If you need further assistance with this issue, please ask support for more info on this.
o
@Vapi no it should be sent as one string all 5 questions
v
@Om Understood! If all five questions are intended to be sent as one string, then the webhook response should be formatted with a single "result" field that contains all the questions concatenated into one string. Here's how the response should be structured:
Copy code
json
{
    "results": [
        {
            "toolCallId": "call_VqUkbjAKfu0fqlemhkaQrEpS",
            "result": "Do you require assistance with IT infrastructure planning and optimization? Are you currently facing challenges with cybersecurity or data protection? ... [include all other questions here as part of the single string]"
        }
    ]
}
Make sure that the entire string is well-formatted and does not exceed any character limits that may be imposed by the VAPI. If you're ready to send this response and need assistance with anything else, please let me know!
o
@User can you help in this please
s
Hey @Om To help track down this issue, could you share: - The call ID - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help me figure out what went wrong!
o
It got resolved on its own after a week, like the same things working now
2 Views