Tools not working with Make.com
# support
t
I am trying to send the data from Make.com to Vapi via Webhook about the Available slots for Booking. But the Vapi is not taking the data and is telling some random dates. can you tell me the right format for sending the data. Right now this is how I am sending the data to Vapi: { "results": [ { "toolCallId": "call_FGUgwC1IJdf5su3fHYF3WR81", "result": "{"date":"2024-07-25", "message":"all times are available"} {"starttime":"2024-07-26T07:00:00", "endtime":"2024-07-26T08:00:00"} {"starttime":"2024-07-26T09:00:00", "endtime":"2024-07-26T10:00:00"} {"starttime":"2024-07-26T11:00:00", "endtime":"2024-07-26T12:00:00"}" } ] }
v
@Test0202 It seems like the data format you're using to send the available slots to VAPI might not be correctly structured, which could be why VAPI is not interpreting the dates properly. The
result
field appears to contain a JSON string that is not properly formatted as a JSON array or object. Here's how you can structure the data correctly in JSON format:
Copy code
json
{
  "results": [
    {
      "toolCallId": "call_FGUgwC1IJdf5su3fHYF3WR81",
      "result": {
        "date": "2024-07-25",
        "message": "all times are available",
        "slots": [
          {
            "starttime": "2024-07-26T07:00:00",
            "endtime": "2024-07-26T08:00:00"
          },
          {
            "starttime": "2024-07-26T09:00:00",
            "endtime": "2024-07-26T10:00:00"
          },
          {
            "starttime": "2024-07-26T11:00:00",
            "endtime": "2024-07-26T12:00:00"
          }
        ]
      }
    }
  ]
}
In this corrected format, the
result
field is an object that includes a
date
, a
message
, and a
slots
array. Each slot is an object with
starttime
and
endtime
fields. Please ensure that the data you send matches the expected schema defined by VAPI. If you're unsure about the schema, you should refer to the VAPI documentation or contact support for more information on the correct data format for available slots.
You can continue this conversation by mentioning me in the message.
a
Thanks for this answer it's helping me as well! What if I want to send a REJECTION to VAPI which means the function call did not work or needs to do something else before booking.
s
1. send the data w/o spacse b/w the string 2. teach assistant how to use o/p -- 3. share the call id if done the above
use error property instead
Copy code
json
{
    "results": [
        {
            "toolCallId": "X",
            "error": "Y"
        }
    ]
}
a
@Shubham Bajaj thanks! so I put "message": "message here" if there is no error and "error':"error message here" if it fails right? also i notice that the agent calls the tool multiple times how can i prevent this?
s
create a new support ticket and describe your issue with call id.
t
@Shubham Bajaj Do you think the Problem could also be that the Flow in make scenario is getting called again and again because the free slots that I get are also going through ChatGPT in make.com which takes time to process the result, and the Vapi assistant might not be waiting for the response when the flow gets called?
s
- vapi waits for 20 secs - problem is in make scenario because response is not returned as expected - ideally you shouldn't be doing anything after you have returned the response as per my knowledge
t
@Shubham Bajaj Can you show how the response Should be returned as I have already referred to the tools documentation? Also as you can see when I made the complaint of it not working, I provided the Data format as it was sent to Vapi from Make. The Format that Bot provided did not work either. Can you Help regarding this?
Also What does the second point mean?
This is how I am sending the data to Vapi from Make but it is not Working. This is the format that Bot gave me. Right now I am trying to send the dates Static so that I can know the correct format. https://cdn.discordapp.com/attachments/1266038000467316830/1267370984231538699/Screenshot_from_2024-07-29_12-08-19.png?ex=66a88ab5&is=66a73935&hm=735594920fbafc5bd16e402ff4641b5417c536694aa8bda22814f219fcd103a8&
s
@Test0202 please create a new ticket.
t
The issue has been solved. Thank you.
8 Views