Assistant is not executing the function I created
# support
r
so we have a function connected to Make that should send name, phone number and intention to a webhook that is received in Make.com when all the questions are answered. First it was making the call to the function right after the call was iniciated, but now it does not execute the function so no information is being sent to the webhook. I need support on this
v
message has been deleted
@Rafael I'm here to help you with the issue you're experiencing. It sounds like there might be a problem with the trigger that initiates the function call to send the data to the webhook. To assist you effectively, I'll need a bit more information: 1. Can you confirm if there have been any recent changes to the system or the function that might have affected its behavior? 2. Is there any error message or log that you can provide which indicates what might be going wrong? 3. Could you verify if the function is being called at all, or if it's an issue with the data not being sent correctly to the webhook? Once we have more details, we can proceed with troubleshooting the issue. If you have access to the relevant logs or system configurations, please review them for any anomalies or errors. If the function is not being triggered as expected, we may need to look into the conditions or events that are supposed to initiate the function call. If the function is being called but the data isn't reaching the webhook, there might be an issue with the data payload or the network request itself. Please provide as much information as you can, and we'll work together to resolve this issue. If you're unable to find the cause, you may need to ask support for more info on this.
You can continue this conversation by mentioning me in the message.
r
@Vapi 1. Yes. First the function was called but received an error 500 in the logs. Then I edited it and now the assistant does not execute it. When I see the webhooks tab it shows no recent executions 2. I currently dont have an error message because the tool is not being used by the agent 3. The function is not being called during the call. If the function was being called during the call, there would be a log in the webhooks tab, but there is none
v
@Rafael Thank you for providing more details. It seems like the issue could be related to the changes you made after encountering the error 500. Here's what we can do to troubleshoot the problem: 1. **Review the Changes**: Go back to the last known good configuration before the error 500 started occurring. Check what changes were made and if they could have inadvertently affected the trigger mechanism. 2. **Check the Trigger Conditions**: Ensure that the conditions or events that are supposed to trigger the function are still valid and have not been altered during your recent edits. 3. **Test the Function Manually**: If possible, try to manually trigger the function to see if it executes correctly and sends data to the webhook. This can help determine if the issue is with the trigger or the function itself. 4. **Review Integration Settings**: Double-check the integration settings in Make.com and ensure that the webhook is correctly configured to receive data from the function. 5. **Consult Documentation**: Review the documentation for the function and webhook to ensure that all required parameters and configurations are correct. 6. **Check for Conflicts**: Ensure that there are no conflicts with other functions or processes that might prevent the function from being called. If after these steps the function is still not being triggered, it might be necessary to consult with the support team for the specific tool or service you're using. They might have more insights into why the function isn't being executed after your recent edits. If you need further assistance or if there's anything else I can do to help, please let me know. If you're ready to close this support ticket because the issue is resolved or you have the information you need to proceed, just say so and I can close the ticket for you.
r
@Vapi I would like to have the support team on this. I tried all this and could not fix the issue
v
@Rafael Please ask support for more info on this.
v
@Rafael It's good to hear that the function is being called now, but receiving an error 500 indicates there's a server-side issue. Here are a few steps you can take to resolve this: 1. **Check Server Logs**: Review the server logs to find more details about the error. The logs often provide insights into what went wrong, such as issues with the code, database errors, or other backend problems. 2. **Validate Data**: Ensure that the data being sent to the webhook is correctly formatted and all required fields are included. Sometimes, missing or incorrectly formatted data can cause a server error. 3. **Test the Endpoint**: Use a tool like Postman or cURL to manually send a request to the webhook endpoint to see if the issue is reproducible outside of the function call. 4. **Review Code Changes**: If you made any code changes during your repairs, double-check them to ensure there are no syntax errors or logical issues that could be causing the server to return an error 500. 5. **Resource Availability**: Verify that the server has enough resources (memory, CPU) and isn't being overloaded, which could lead to such errors. 6. **Dependency Check**: If your function relies on external services or databases, make sure they are operational and accessible. If you're still unable to resolve the error after these steps, it might be necessary to escalate this to your development team or the support team for your server or the service hosting the webhook. They can provide more specific guidance based on the details of the error and your server configuration. Would you like to proceed with closing this support ticket, or is there anything else I can assist you with?
r
@Vapi i want to speak with a human
v
@Rafael Please ask support for more info on this.
r
@Vapi i have not received any updates on this
v
@Rafael I understand that you're looking for updates on the issue with the error 500. If you haven't received any updates, it's important to reach out directly to the human support team who can look into the matter more deeply. They will have access to the necessary tools and logs to diagnose and resolve the issue. Please contact the support team of the service you're using, whether it's your server hosting provider, the webhook service, or the platform where your function is deployed. Provide them with all the relevant information, including what you've tried so far and any logs or error messages you have. If you need assistance with how to contact them or what information to provide, let me know, and I'll guide you through the process.
s
Hey @Rafael 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!
r
Hello @Shubham Bajaj, - I have several calls where the function is not being executed. Here is an example: eaebf0c5-ecc9-47cd-b970-3b60acd543d7 (all my calls are in spanish) - I mean, the function I have that sends info to a webhook is never executed, so I´m guessing during the whole call - I was expecting the assistant to use a tool called "enviar_info_a_highlevel", that sends the name, phone number and intention to a webhook I receive via Make.com. Then that automation updates his contact in GHL The tool´s description says that it should be executed ALWAYS after the user has answered the questions: what do you need? and what is your name? - The response I got is that the tool is not being used by the assistant The assistant´s ID is 7db3f6cf-b202-439c-a008-ca0bd79f1093
s
@Rafael Here's what you need to do: First, remove the canonical and use Trieve instead. You can learn more about it from here https://docs.vapi.ai/knowledgebase After that, make the first call without KB. If it doesn't succeed, then change the model to gpt-4o. Otherwise, keep the current config as is and add the KB with Trieve. If you observe any failure at this point, change the model to gpt-4o. If it still doesn't work, rework your prompt according to the VAPI prompting guide. If all of this fails, share the details in the above mentioned format so I can take a look. Please let me know your thoughts on this.
The tools are not triggering is because of canonical KB, and canonical KB has stopped their services long ago. So yeah do share your thoughts.
r
@Shubham Bajaj Hello Shubham. My problem is not about the knowledge base as the article you sent me says. My problem is about the execution of the Tool I created. In some calls I have to say specifically to the assistant to send the information for the tool to be used
s
@Rafael During your call, you utilized the canonical provided knowledge base, which resulted in the failure of certain functions and tools to execute properly. Therefore, I have suggested the aforementioned changes or debugging flow.