Vapi Tools not working
# support
d
Hey I'm trying to make an assistant that only gets me the current date and time for starters. I build the appropriate scenario in make.com (which runs and gives the accurate date & time w/o errors), but, the assistant doesnt relay that information on the call. The only reply from the assistant is "Success", the assistant replies by saying "The current date and time is Success". Why is this happening, even when i'm using the correct syntax for the webhook response. Call ID: 0f254eed-e3ac-4648-8c83-7e854792572a f780941e-bfb6-4c16-bd49-3b88a3734245
v
message has been deleted
@disanj It sounds like there might be an issue with how the response from your make.com scenario is being handled or formatted before it's relayed back to the assistant. When you set up the clientMessages field for the assistant, you need to ensure that the message being sent back contains the actual date and time information, rather than a static text like "Success". Here's what you can check: 1. Verify the output of your make.com scenario to ensure it's sending back the date and time in the expected format. 2. Check the configuration of your assistant to ensure it's set up to parse the response from the make.com scenario and include the date and time in the message event payload. 3. Ensure that the assistant's script is correctly extracting the date and time from the message event and using it in the response to the user. If you've confirmed that the make.com scenario is working correctly and the issue persists, it might be helpful to look at the logs or debug the assistant to see exactly what data it's receiving and how it's being processed. If you need further assistance with this, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
d
@Vapi how do i check for 2 & 3 ?
v
@disanj To check for points 2 and 3, you'll need to do the following: 2. Check the Configuration of Your Assistant: - Access the platform where your voice assistant is configured. - Look for the section where you handle the webhook response or the integration settings with make.com. - Ensure that the assistant is set up to receive the correct payload from the make.com scenario. This usually involves specifying the correct JSON paths to extract the date and time from the response. 3. Ensure Correct Script Processing: - Review the script or code that processes the incoming webhook response within your assistant's platform. - Check if there's a parsing function or method that's supposed to extract the date and time from the payload. - Make sure that the script is not just echoing a status message but is actually using the extracted date and time data in the response to the user. - If you have access to logs, check them to see what data is being received and how it's being handled. If you're not sure how to perform these checks or if you're unable to resolve the issue, you might want to reach out to the support team of the platform you're using for your voice assistant or the support for make.com for more detailed guidance.
d
@Vapi , the make.com scenario is workingg perfectly fine, and as mentioned earlier, I even have the correct format for the webhook response
@Vapi ?
v
@disanj I apologize for the confusion. If your make.com scenario is working correctly and the webhook response format is correct, then the issue likely lies in how your assistant is processing the webhook response. Here's what you can do to troubleshoot further: 1. Review the Assistant's Integration Configuration: - Double-check that the assistant's integration settings are correctly mapped to accept the date and time values from the make.com scenario. - Ensure that the assistant is not just acknowledging the webhook's success status but is actually set to relay the content of the response. 2. Inspect the Assistant's Script or Code: - Look at the part of the code or script where the response from make.com is handled. - Verify that the variables for the date and time are being correctly assigned from the webhook response. - Check for any hardcoded responses that might be overriding the dynamic content. 3. Test the Assistant Locally (if possible): - If you have the ability to run the assistant in a local or development environment, try to simulate the webhook response to see how the assistant processes it. 4. Consult Documentation or Forums: - Review the documentation for the assistant platform to ensure you haven't missed any configuration steps. - Search for forums or community discussions related to your issue, as others might have encountered and solved a similar problem. 5. Reach Out for Support: - If you're still unable to resolve the issue, consider reaching out to the support team of the assistant platform you're using. They may be able to provide more specific guidance based on their system's logs and your configuration. If you need further assistance with this, please let me know, and I can help guide you through the process or provide additional support.
d
@Vapi can you elaborate 1 & 2 ?
f
It helps to tell the assistant how to receive the result. In my use for example I tell the assistant: "Call the function 'identifyTech' and wait until you receive the technician's name. -Extract the name from the function 'identifyTech' response. The name is provided in the format: "The Technician's name is: [Name]"." And then in make.com webhook response: "{ "results": [ { "toolCallId": "{{1.message.toolCalls[].id}}", "result": "The Technician's name is: [John]" } ] }"
d
Hey Francois! I do have it mentioned in my prompt that the assistant should use the getCurrentDateAndTime function to get the date and time values, haven't added the part about how to extract it yet. Gonna try that out!
no luck @Francois
f
Can you show me your make.com webhook response?
{ "results": [ { "toolCallId": "{{1.message.toolCalls[].id}}", "result": "The current date and time is {{2.
date and time
}}" } ] }
n
Likely tool.async=true. If tool.async=true, we don't wait for the response. Set that to false
f
Yes, Also I assume the date and time resolves correctly?
d
Yes, this was set to true, changed it, now it works perfect!
Thanks man!