Trouble with getting a proper array with tool call...
# support
a
Call id: 96b8fe53-4569-4cff-8f63-aff6269f9c1f I'm having trouble getting back the array of available timeslots using the tool call function. My make scenario should send 2 information: reservation_success: true/false (string) and available_slots (array) Everytime I try sending my array using webhook response (tool result call), my array gets deformed and sent in a super weird way. Here is how my webhook response looks like: { "results": [ { "toolCallId": "5e08e624-dfeb-4b91-91e2-18e42efd86c3", "result": { "reservation_success": "true", "available_slots": [{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object},{object}] } } ] } As you can see, the array is sent as a complete rubish and my agent doesn't get correct information.
v
@Alex AI-kido 🤖 I'm sorry to hear you're experiencing issues with your webhook response. It seems like the array of available slots is not being formatted correctly when it's sent. To assist you better, I would need to know the exact structure of the objects within the
available_slots
array and how you're formatting them before sending the response. However, here are a few general tips that might help resolve the issue: 1. Ensure that each object within the
available_slots
array is properly formatted as a JSON object with the necessary key-value pairs. 2. Verify that the content-type of your response is set to
application/json
. 3. Double-check that you're not accidentally converting the array to a string before sending it. 4. If you're using a serialization library to convert your data to JSON, make sure it's configured correctly to handle arrays of objects. If you provide me with the structure of an individual object within the
available_slots
array, I can give you more specific advice. Otherwise, if you need further assistance, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
a
Here is a copy/paste from 1 of my make.com runs, this is how the array is structured: "available_slots": [ { "time": "2025-01-20T09:00:00+01:00" }, { "time": "2025-01-20T10:00:00+01:00" }, { "time": "2025-01-20T11:00:00+01:00" }, { "time": "2025-01-20T12:00:00+01:00" }, { "time": "2025-01-20T14:00:00+01:00" }, { "time": "2025-01-20T15:00:00+01:00" }, { "time": "2025-01-20T16:00:00+01:00" }, { "time": "2025-01-21T09:00:00+01:00" }, { "time": "2025-01-21T10:00:00+01:00" }, { "time": "2025-01-21T11:00:00+01:00" }, { "time": "2025-01-21T12:00:00+01:00" }, { "time": "2025-01-21T14:00:00+01:00" }, { "time": "2025-01-21T15:00:00+01:00" }, { "time": "2025-01-21T16:00:00+01:00" }, { "time": "2025-01-22T09:00:00+01:00" }, { "time": "2025-01-22T10:00:00+01:00" } ] https://cdn.discordapp.com/attachments/1330221332452999321/1330240996704780288/Screenshot_417.png?ex=678d42f8&is=678bf178&hm=4e68b5607e3101f7a9bb48200da829f62c3a8e7339a8bbdfa1811d3de28ce797& https://cdn.discordapp.com/attachments/1330221332452999321/1330240997031940127/Screenshot_418.png?ex=678d42f8&is=678bf178&hm=e7bab0fc8fb97c97e733e813e63d6437715e1c076d6a534c6681f05c25402ea3&
v
@Alex AI-kido 🤖 Thank you for providing the structure of the
available_slots
array. The format looks correct, and each slot is a well-formed JSON object with a
time
key. If the array is getting deformed when sent through the webhook response, it could be due to the way the data is being serialized or handled during the transmission process. Here are a few steps you can take to troubleshoot and resolve the issue: 1. Check Serialization: Ensure that the serialization process is not altering the structure of the array. The data should be serialized into a JSON string correctly before being sent. 2. Content-Type Header: Confirm that the
Content-Type
header of your webhook response is set to
application/json
. This informs the receiving system that the payload is in JSON format. 3. Webhook Configuration: Review the configuration of your webhook in make.com to ensure it's set up to accept and process JSON payloads correctly. 4. Test with a Tool: Use a tool like Postman or a similar API testing tool to manually send a test payload to your webhook URL to see if the issue persists. This can help you isolate whether the problem is with the sending or receiving end. 5. Logging: Implement logging on both the sending and receiving ends to capture the raw data being transmitted. This can help you identify any discrepancies between what is sent and what is received. 6. Consult Documentation: Review the make.com documentation for any specific requirements or limitations regarding webhook responses. If after these steps the issue is still not resolved, it might be helpful to reach out to make.com support for further assistance, as they may provide insights specific to their platform. If you need any more help or have additional questions, feel free to ask!
s
Hey @Alex AI-kido 🤖 To help track down this issue, could you share: - What response you expected to get - What response you actually got instead This would really help me figure out what went wrong!
a
Hey, I fixed the issue, the problem was properly creating s tool call and not framing it as a variable, instead of the value of result variable, thank you for getting back to me, you can close the ticket 🙌
s
@Alex AI-kido 🤖 could you share your prompt and an example about this tool response? Im facing the same issue
3 Views