Google Calendar integration not able to check avai...
# support
t
Just started using the tool, and so far I love it... However I'm having issues with the native calendar integration. When it tries checking availability the tool keeps giving me this response Invalid function arguments for tool call: call_DlWALLg0bjNYCep99XOjrR2G Am I missing something?
v
Hi there! 👋 I'm happy to hear you're enjoying Vapi so far! I don't have specific information about what might be missing in your Google Calendar integration setup, but I can definitely help troubleshoot the "Invalid function arguments for tool call" error you're experiencing. Based on the information I found, this error typically occurs due to several possible issues: 1. **Incorrect response format**: The tool call response needs to be in a specific format, including the correct
toolCallId
and a properly formatted
result
field. The result should be a string without line breaks, and JSON responses should be stringified. The expected format is:
Copy code
json
{
    "results": [
        {
            "toolCallId": "your-tool-call-id",
            "result": "Your result as a string"
        }
    ]
}
2. **JSON schema and property issues**: The error might be caused by using the wrong JSON schema or invalid property names in your tool configuration. 3. **Time zone considerations**: For calendar integrations, correct time zone handling is crucial. You might want to include the current date and time in your system prompt using dynamic variables. For example:
Copy code
{{\"now\" | date: \"%b %d, %Y, %I:%M %p\", \"America/New_York\"}}
4. **Tool configuration**: Verify that your tool is configured as
synchronous
rather than
async
, and check that all required parameters are correctly defined. 5. **Variable substitution**: Ensure that variable values are being passed correctly in the payload, rather than just the variable paths. Would you be able to share more details about your setup or the specific steps you've taken to configure the Google Calendar integration? That might help me provide more targeted assistance! Sources: - [Discord thread about Invalid function arguments error](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1342315282198298729)
v
Hey Tyler, It is a tool called ID, and we require Call ID for debugging and investigation. Could you please share the Call ID? To get the Call ID, visit the WAPI dashboard. On the left-hand side, scroll down to the Observe section. Click on it; you will find the Logs page. Again click on it, it will take you to a new page where you will see all of your Call IDs. Just share with me any of the recent Call IDs.
t
sure, here is one: b92b32a0-b7cc-4d2f-999e-c28880c7ae27
Hey @Shubham Bajaj - any update?
v
Hi, it appears that there are some missing arguments for the call. In order for the calendar check to work, these arguments must be passed: Google Calendar Check Availability Tool This tool uses the following fields to check availability: - `startDateTime`: The start of the time range to check - `endDateTime`: The end of the time range to check - `timeZone`: The timezone for the availability check In our tool dashboard, it should have these function arguments show up so that they can be assigned but we don't yet. I will let our team know about this issue and have them implement it. For now, make sure these arguments are filled. Let us know how it goes!
g
Hi Kyle, I want to second this, I'm also having trouble with the google calendar integration, it doesnt have any option to add the arguments. thanks!
v
Normally there would be a section for parameters, but we are still working on fixing it before we enable it on the dashboard. You might still be able to manually input the parameters when using the API for now.
g
Gotcha, thanks for letting me know Kyle, maybe I can get it working through make in the meantime. I tried via the API but I got { "message": [ "property type should not exist" ], "error": "Bad Request", "statusCode": 400 }
v
Make sure you include the required parameters: Google Calendar Create Event Tool This tool uses the following fields to create events: - `summary`: The title or description of the calendar event - `startDateTime`: The start date and time of the event - `endDateTime`: The end date and time of the event - `timeZone`: The timezone for the event Google Calendar Check Availability Tool This tool uses the following fields to check availability: - `startDateTime`: The start of the time range to check - `endDateTime`: The end of the time range to check - `timeZone`: The timezone for the availability check