I cant seem to get Vapi to recognize the response ...
# support
r
Im trying to get VAPI to use the data from a webhook query using a tool. Do i need to add all of the response items in the response for the system to be able to use them, or is it smart enough to parse the json and use the data?
v
@Rb Surge VAPI is designed to be flexible and smart when it comes to handling JSON data. However, it does require clear instructions on which data to use from the JSON response. If you want VAPI to use specific data from a webhook query response, you should ensure that the relevant items are included in the response and are properly formatted. When your server receives an HTTP request from VAPI, it should process the request, extract the necessary data, and then format the response in the JSON structure that VAPI expects. VAPI will then parse the JSON response and use the data as instructed in the tool's configuration. If you have specific data points you want to use from the webhook query, you should include them in the "results" array of the response JSON. Here's an example of how to structure the response:
Copy code
json
{
    "results": [
        {
            "toolCallId": "unique_identifier_for_tool_call",
            "result": "data_point_you_want_to_use"
        },
        // ... other results if necessary
    ]
}
If you need assistance with configuring your server to handle the webhook query and format the response for VAPI, please let me know, and I can provide further guidance.
You can continue this conversation by mentioning me in the message.
r
Does the JSON need to say results for it to parse the data?
I keep getting this message, but the URL checks out with Postman. [ERROR] tool-calls Server URL Error: Request failed with status code 404
s
Hey @Rb Surge 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!