https://retellai.com/?utm_source=discord&utm_medium=seo logo
I have a function that is supposed to send a reque...
# ❓・ai-evy-support
n
@AI Evy I have a function that is supposed to send a request to a n8n webhook to check when the next free meeting slots are. My issue is twofold 1 I see it sends this "tool_call_id: tool_call_b2cc44 { "datetime": "2024-06-10T08:00:00.000+02:00" }" that is completely wrong date and day 2 it gets no response
a
Thanks for tagging me @Nawee. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Calling Webhooks In The Middle of A Call](https://discord.com/channels/1186424376300679209/1376986877927886979) [[2] Webhook Overview](https://docs.retellai.com/features/webhook-overview) ​
### Answer Looking at your issue, you're dealing with a custom function that calls an external n8n webhook during a call. Based on the available sources, there are a few key points to address: For the incorrect date issue: The datetime being sent appears to be generated by the LLM rather than using current date information. This suggests a prompting issue where the agent isn't properly understanding how to format or calculate the correct datetime [(1) ]() . For the no response issue: When using custom functions to call external APIs, the function needs to properly return data in a format the LLM can understand . The webhook timeout specifications show that webhooks have a 10-second timeout, and if no success status (2xx) is received within that timeframe, it will be retried up to 3 times [(2) ]() . Recommendations: 1. **Improve prompting**: Give the agent strict instructions about how to handle datetime formatting and ensure it uses current date/time information [(1) ]() 2. **Check response format**: Ensure your n8n webhook returns data in a clear JSON format that the LLM can parse 3. **Verify endpoint**: Test your n8n webhook endpoint independently to ensure it's responding correctly within the 10-second timeout [(2) ]() The sources indicate that custom functions can be called during calls and should work for real-time data retrieval like checking available meeting slots [(1) ]() . The key is ensuring proper prompting and that your external endpoint responds in a format the agent can understand.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy how can I make a node aware of that time and date it is without being static
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Retell AI provides system default dynamic variables for current time and date that you can use in your nodes [(1) ]() . These variables are automatically populated with real-time information without requiring static values . The available system default dynamic variables include : - {{current_time}}: current time in America/Los_Angeles (Monday, March 24, 2025 at 02:53:01 PM PDT) - {{current_time_[timezone]}}: current time in given timezone For timezone-specific examples, you can use : - current_time_Australia/Sydney - current_time_America/New_York These dynamic variables work in both single, multi and conversation flow agents . You can reference them directly in your custom function parameters or use them in your node configurations to ensure your agent always has access to the current date and time information. To use these in your custom function that calls the n8n webhook, you can include {{current_time}} or a timezone-specific variant in your function parameters, which will automatically populate with the real-time date and time when the function is called .
​ To learn more, see the sources I considered: [[1] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
n
@AI Evy so I can just write {{currenttime[Stockholm]}} into a nodes prompt?
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer Yes, but you need to use the correct syntax. Based on the documentation, the proper format for timezone-specific current time variables is
{{current_time_[timezone]}}
, not
{{currenttime[Stockholm]}}
[(1) ]() . For Stockholm specifically, you would use:
Copy code
{{current_time_Europe/Stockholm}}
The documentation shows that dynamic variables can be used in prompts , and you can reference current time in specified timezones using the format
{{current_time_[timezone]}}
. The example given in the documentation shows
{{current_time_Australia/Sydney}}
. So in your node's prompt, you can write something like:
Copy code
"The current time in Stockholm is {{current_time_Europe/Stockholm}}"
This will automatically populate with the real-time date and time in Stockholm timezone when the node executes .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy my tool still sends "Tool Invocation: Check_bookings tool_call_id: tool_call_cd915d { "datetime": "2024-06-12T14:00:00+02:00" }" to the webhook
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer [(1) ]() From Thursday, October 02, 2025 (2025-10-02) , I can see that your tool is sending a date from 2024, which is clearly incorrect. Based on the LLM WebSocket documentation, when you send tool call invocations through the WebSocket, you need to send both the tool call invocation event and the tool call result event . The issue you're experiencing suggests that your LLM is generating incorrect datetime values in the tool call arguments. Looking at the WebSocket protocol, tool call invocations are sent with this structure :
Copy code
json
{
  "response_type": "tool_call_invocation",
  "tool_call_id": "string",
  "name": "string",
  "arguments": "boolean"
}
The
arguments
field contains a stringified JSON object . In your case, the LLM is populating the datetime argument with an outdated value from 2024. This appears to be an issue with how your custom LLM is handling the current date/time information. The WebSocket documentation shows that Retell sends various events to your server including update events with live transcript data, but the datetime generation happens on your LLM side . To resolve this, you'll need to ensure your custom LLM has access to current date/time information when generating the tool call arguments. The problem isn't with the WebSocket protocol itself, but with how your LLM is determining what datetime value to send in the tool call.
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy I got a converstaion node then a functions node that is connected to my webhook I added "The current time in Stockholm is {{current_time_Europe/Stockholm}}" to the conversation node hoping it would help
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer ### Answer The issue is that dynamic variables like
{{current_time_Europe/Stockholm}}
in conversation nodes don't automatically pass their values to function nodes [(1) ]() [(2) ]() . When your function node calls the webhook, it's generating parameters based on the LLM's understanding, not the dynamic variables from previous nodes. For custom functions, you need to include the dynamic variables directly in the function parameter definition [(1) ]() . In your custom function configuration: 1. In the function parameters section, you can include dynamic variables that will be resolved when the function is called 2. Header values and query parameter values can include dynamic variables The documentation shows that you can define parameters for custom functions using JSON schema format, and these parameters can include dynamic variables . For example, you could modify your function parameter schema to include:
Copy code
json
{
  "type": "object", 
  "properties": {
    "datetime": {
      "type": "string",
      "description": "Current datetime in Stockholm timezone: {{current_time_Europe/Stockholm}}"
    }
  }
}
Alternatively, you can set the current time as a request header or query parameter in your custom function configuration, using the dynamic variable syntax . The system default dynamic variables like
{{current_time_Europe/Stockholm}}
work across single, multi and conversation flow agents, but they need to be properly integrated into the function call mechanism rather than just mentioned in a conversation node [(3) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) [[3] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
n
@AI Evy good now it knows what time it is but instead of a reply I get this as a response "tool_call_id: tool_call_b064a2 {"type":"object","properties":{"available":"{{ $json.available }}"}}"
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer ### Answer Based on the response you're getting, it looks like your webhook is returning a JSON schema definition instead of actual data [(1) ]() . The issue appears to be that your n8n webhook is returning the schema structure
{"type":"object","properties":{"available":"{{ $json.available }}"}}
rather than the actual available booking data. For tool calls to work properly in Retell AI, you need to send both the tool call invocation and the tool call result through the LLM WebSocket . The tool call result event should contain the actual content from your webhook:
Copy code
json
{
  "response_type": "tool_call_result",
  "tool_call_id": "string",
  "content": "string"
}
The
content
field should contain the actual result from your webhook (like available time slots) , not the schema definition . This issue is similar to what was reported in the Discord forum where tool call results were missing content [(2) ]() . The problem is that your webhook needs to return actual data that can be used as the
content
in the tool call result event. To fix this: 1. Check your n8n webhook configuration - ensure it's returning actual booking data, not schema definitions 2. Verify the webhook response format - it should return usable data like
{"available": ["10:00", "14:00", "16:00"]}
instead of schema syntax 3. Test your webhook independently to confirm it returns the expected booking data The tool call invocation is working correctly (it's sending the right datetime now) , but your webhook needs to return actual booking availability data rather than a schema template.
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Tool call invocations and results missing content in the transcript](https://discord.com/channels/1186424376300679209/1310721338062667797) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy if I check the output in n8n the output is "[ { "output": "2025-10-03T13:00:00.000+02:00\n2025-10-03T14:00:00.000+02:00\n2025-10-03T15:00:00.000+02:00" } ]"
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer Good! Your n8n webhook is now returning the correct data format with actual available time slots [(1) ]() . The issue is that this response format needs to be properly handled by your tool call result event . When using custom LLM with WebSocket, you need to send a tool call result event after receiving the webhook response :
Copy code
json
{
  "response_type": "tool_call_result",
  "tool_call_id": "string",
  "content": "string"
}
The
content
field should contain the actual booking data from your n8n webhook . In your case, you'd want to format the available time slots in a way the LLM can understand and communicate to the user. For example, you could format the
content
as:
Copy code
Available time slots for October 3rd, 2025:
- 1:00 PM (13:00)
- 2:00 PM (14:00) 
- 3:00 PM (15:00)
The key is that your custom LLM server needs to: 1. Send the tool call invocation event when the function is triggered 2. Receive the webhook response from n8n 3. Send the tool call result event with the formatted content Since you're getting the correct data from n8n now, the issue is likely in how your custom LLM server is processing and sending back the tool call result event .
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy no matter what I seem to do I get from n8n a response that looks like this in retell "tool_call_id: tool_call_e152f2 {"type":"object","properties":{"available":"{{ $json.available }}"}}" in n8n it is correct
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
The
content
field should contain the actual available time slots from your n8n workflow, not the schema definition . Since you confirmed that n8n shows the correct output internally, the issue is that the HTTP response from your n8n webhook isn't properly formatted for external consumption. To fix this: - In n8n, ensure your final HTTP Response node outputs the raw data without schema wrapping - The response should be plain JSON or text that Retell can use directly as the tool call result content
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Tool call invocations and results missing content in the transcript](https://discord.com/channels/1186424376300679209/1310721338062667797) ​
### Answer ### Answer The issue you're experiencing is that the response being returned to Retell contains a JSON schema template instead of the actual data [(1) ]() . Based on the LLM WebSocket documentation, when using custom functions with tool calls, you need to ensure the tool call result contains the actual content, not schema definitions . The response
{"type":"object","properties":{"available":"{{ $json.available }}"}}
suggests that n8n is returning a schema template rather than processing the actual data . This is similar to the issue reported in the Discord forum where tool call results were missing content [(2) ]() . The problem is likely in your n8n webhook configuration: 1. Check your n8n response node - ensure it's outputting the actual data, not a schema template 2. Verify the HTTP Response node in n8n - it should return the processed data directly, not wrapped in schema syntax 3. Test the webhook endpoint directly - make sure it returns actual booking data when called independently According to the LLM WebSocket protocol, the tool call result event should contain the actual content in this format [(1) ]() :
Copy code
json
{
  "response_type": "tool_call_result",
  "tool_call_id": "string",
  "content": "string"
}
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy I use webhook response as the final node
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer The issue is that your n8n webhook is still returning a schema template format instead of the actual data that Retell AI needs [(1) ]() . Even though you're using a webhook response node as the final node, the response format isn't compatible with what Retell AI expects for tool call results . Based on the LLM WebSocket documentation, when your custom function calls the n8n webhook, the response needs to be processed into a tool call result event with this structure :
Copy code
json
{
  "response_type": "tool_call_result",
  "tool_call_id": "string",
  "content": "string"
}
The
content
field should contain the actual available time slots as plain text or JSON that the LLM can understand and communicate to the user . The schema format
{"type":"object","properties":{"available":"{{ $json.available }}"}}
that you're seeing suggests that n8n is returning metadata about the data structure rather than the actual data itself . To resolve this: 1. In your n8n webhook response node, ensure you're returning the raw booking data directly, not wrapped in any schema format 2. The response should be simple JSON like
{"available_slots": ["2025-10-03T13:00:00.000+02:00", "2025-10-03T14:00:00.000+02:00", "2025-10-03T15:00:00.000+02:00"]}
3. Your custom LLM server needs to take this webhook response and format it into the tool call result event's content field The problem appears to be that the webhook response node in n8n is outputting a schema definition rather than the processed data, even though the data processing is working correctly internally.
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy now I have set the response body to be "{"available_slots": {{ $json.output }}]}"
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer ### Answer Good! Setting the response body to
{"available_slots": {{ $json.output }}}
is much better than the schema format you were getting before [(1) ]() . However, there's a syntax error in your JSON - you have an extra closing bracket
]
at the end that should be a closing brace
}
. The correct format should be:
Copy code
json
{"available_slots": {{ $json.output }}}
Based on the LLM WebSocket documentation, when your custom function receives this webhook response, it needs to be processed into a tool call result event :
Copy code
json
{
  "response_type": "tool_call_result",
  "tool_call_id": "string",
  "content": "string"
}
The
content
field should contain the actual booking data from your n8n webhook . Since your n8n output shows the available time slots correctly, your custom LLM server should take the webhook response and format it into readable content for the user. For example, if your webhook returns:
Copy code
json
{"available_slots": "2025-10-03T13:00:00.000+02:00\n2025-10-03T14:00:00.000+02:00\n2025-10-03T15:00:00.000+02:00"}
Your tool call result content could be formatted as:
Copy code
Available booking slots for October 3rd, 2025:
- 1:00 PM (13:00)
- 2:00 PM (14:00)
- 3:00 PM (15:00)
The key is ensuring your custom LLM server properly processes the webhook response and sends it back as a tool call result event .
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy now the response was"Tool Result tool_call_id: tool_call_7c0d06"
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer ### Answer The response "Tool Result tool_call_id: tool_call_7c0d06" indicates that your tool call invocation was sent successfully, but the tool call result content is missing [(1) ]() [(2) ]() . This is similar to the issue reported in the Discord forum where tool call results were missing content in the transcript [(2) ]() . According to the LLM WebSocket documentation, when using custom functions, you need to send both the tool call invocation event and the tool call result event [(1) ]() . The tool call result event should include the actual content from your webhook:
Copy code
json
{
  "response_type": "tool_call_result",
  "tool_call_id": "string",
  "content": "string"
}
The
content
field is required and should contain the actual result from your n8n webhook - in your case, the available booking slots . The issue is likely that: 1. Your custom LLM server is sending the tool call invocation event correctly (hence you see the tool_call_id) 2. But it's not sending the corresponding tool call result event with the actual webhook response content 3. This results in an empty tool result that doesn't provide the booking information to the user To fix this: Your custom LLM server needs to: 1. Receive the webhook response from n8n with your available slots data 2. Send a tool call result event with the
content
field populated with the actual booking slots 3. Format the content in a way the LLM can understand and communicate to the user The tool call invocation is working correctly, but you need to ensure the tool call result event contains the actual booking data from your n8n webhook .
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Tool call invocations and results missing content in the transcript](https://discord.com/channels/1186424376300679209/1310721338062667797) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy now I made the output from the webhook to beformated as "{ "response_type": "tool_call_result", "tool_call_id": "string", "content": "{{ $json.output }}" }"
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer The approach you're taking won't work correctly [(1) ]() . Your n8n webhook shouldn't be formatting the response as a tool call result event - that's the responsibility of your custom LLM server . According to the LLM WebSocket documentation, the tool call result event must be sent from your custom LLM server to Retell, not from your external webhook . The correct flow is: 1. Your custom LLM server sends a tool call invocation event to Retell 2. Your custom LLM server calls your n8n webhook and receives the booking data 3. Your custom LLM server then sends a tool call result event back to Retell with this format :
Copy code
json
{
  "response_type": "tool_call_result",
  "tool_call_id": "string",
  "content": "string"
}
The
tool_call_id
must match the ID from the original tool call invocation, not be a hardcoded "string" . The
content
field should contain the actual booking slots data from your n8n webhook . Your n8n webhook should return simple data like:
Copy code
json
{"available_slots": "2025-10-03T13:00:00.000+02:00\n2025-10-03T14:00:00.000+02:00\n2025-10-03T15:00:00.000+02:00"}
Your custom LLM server should then process this response and send the tool call result event to Retell with the properly formatted content and the correct
tool_call_id
from the original invocation .
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy I am not using any custom llms I am using what Is in retell and then the webhook to n8n that has chatgpt in it. I have this being sent to the webhook Tool Invocation: Check_bookings tool_call_id: tool_call_5d8125 { "datetime": "2024-06-12T14:00:00+02:00" }" I have this being returned "Tool Result tool_call_id: tool_call_5d8125" in n8n the return looks like this " Available time slots for 2025-10-03:\n- 2025-10-03T13:00:00.000+02:00\n- 2025-10-03T14:00:00.000+02:00\n- 2025-10-03T15:00:00.000+02:00" but is a json
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer I understand now - you're using Retell's built-in Response Engine (not a custom LLM) with a custom function that calls your n8n webhook [(1) ]() . The issue is that your n8n webhook is returning the correct data internally, but Retell isn't receiving the tool call result content properly. When using Retell's Response Engine with custom functions, the webhook response needs to be returned in a specific format that Retell can process as the tool call result content . The problem: Your n8n webhook is returning the formatted booking slots correctly, but Retell is only showing the tool call ID without the actual content. This is the same issue reported in the Discord forum where tool call results were missing content [(2) ]() . For Retell's Response Engine with custom functions: Your n8n webhook should return the booking data as plain JSON that Retell can use directly. Since your n8n output shows:
Copy code
Available time slots for 2025-10-03:\n- 2025-10-03T13:00:00.000+02:00\n- 2025-10-03T14:00:00.000+02:00\n- 2025-10-03T15:00:00.000+02:00
Try setting your n8n webhook response body to:
Copy code
json
{
  "result": "Available time slots for 2025-10-03:\n- 2025-10-03T13:00:00.000+02:00\n- 2025-10-03T14:00:00.000+02:00\n- 2025-10-03T15:00:00.000+02:00"
}
Or simply return the formatted text directly as the response body:
Copy code
Available time slots for 2025-10-03:
- 2025-10-03T13:00:00.000+02:00
- 2025-10-03T14:00:00.000+02:00
- 2025-10-03T15:00:00.000+02:00
The issue appears to be that Retell's Response Engine isn't properly extracting the tool call result content from your webhook response format. Try returning the data as plain text or simple JSON that Retell can directly use as the function result.
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Tool call invocations and results missing content in the transcript](https://discord.com/channels/1186424376300679209/1310721338062667797) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy I can not hardcode the response dates ... it will be set to " { "result": {{ $json.output }} }
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer Perfect! Setting your n8n webhook response to
{"result": {{ $json.output }}}
should work correctly [(1) ]() . This format allows n8n to dynamically populate the actual booking data from your workflow output without hardcoding specific dates. When using Retell's Response Engine with custom functions, the webhook response needs to return data that Retell can process as the tool call result content . Your format should properly pass the dynamic booking slots from your n8n workflow to Retell. The issue you were experiencing earlier where you only saw "Tool Result tool_call_id: tool_call_5d8125" without content is similar to what was reported in the Discord forum where tool call results were missing content in the transcript [(2) ]() . With your current format
{"result": {{ $json.output }}}
, Retell should be able to extract the booking data and use it as the function result content. This allows your AI agent to communicate the available time slots to the user during the conversation. Make sure your n8n workflow's
$json.output
contains the formatted booking slots as you showed earlier:
Copy code
Available time slots for 2025-10-03:\n- 2025-10-03T13:00:00.000+02:00\n- 2025-10-03T14:00:00.000+02:00\n- 2025-10-03T15:00:00.000+02:00
This approach should resolve the issue where the tool call result was appearing without the actual booking content.
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Tool call invocations and results missing content in the transcript](https://discord.com/channels/1186424376300679209/1310721338062667797) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy now I have set the response body in the response n8n webhook to "{"result": {{ $json.output }}}"
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer ### Answer Excellent! Setting your n8n webhook response body to
{"result": {{ $json.output }}}
is the correct approach for custom functions in Retell AI [(1) ]() . This format allows the dynamic booking data from your n8n workflow to be properly returned to Retell's Response Engine. According to the custom function documentation, when Retell sends a request to your webhook endpoint, the response can be in various formats including JSON object, and all formats will be converted to string before sending to the LLM for further processing . The function result is capped at 15,000 characters to prevent overloading the LLM context window . Your current setup should now work correctly: 1. Tool call invocation is being sent properly with the datetime parameter 2. Your n8n webhook is receiving the request and processing the booking data 3. The response format
{"result": {{ $json.output }}}
should allow Retell to extract the booking slots and use them as the function result This should resolve the issue you were experiencing where tool call results were missing content in the transcript [(2) ]() . With this format, Retell's Response Engine should be able to process the booking data and allow your AI agent to communicate the available time slots to users during conversations. The dynamic
{{ $json.output }}
will populate with your actual booking data without requiring hardcoded dates, making it flexible for real-time availability checking.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Tool call invocations and results missing content in the transcript](https://discord.com/channels/1186424376300679209/1310721338062667797) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy I still send "Tool Invocation: Check_bookings tool_call_id: tool_call_e027e4 { "datetime": "2025-10-02T13:28:12+02:00" }" and get "Tool Result tool_call_id: tool_call_e027e4"
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer The issue you're experiencing is that your tool call result is still missing content, which is a known problem reported in the Discord community [(1) ]() . Even though you've set your n8n webhook response body to
{"result": {{ $json.output }}}
, Retell is only showing the tool call ID without the actual content. Based on the LLM WebSocket documentation, when using custom functions with Retell's Response Engine, the tool call result event should contain the actual content [(2) ]() . The fact that you're seeing "Tool Result tool_call_id: tool_call_e027e4" without any content indicates that either: 1. Your n8n webhook isn't returning data in the expected format that Retell can process 2. The response isn't being properly extracted by Retell's Response Engine To troubleshoot this: 1. Test your n8n webhook directly - Make a direct HTTP request to your webhook endpoint with the same payload to verify it returns the expected JSON response 2. Check the n8n webhook response format - Ensure it's returning valid JSON with the
result
field populated 3. Verify the content length - According to the documentation, function results are capped at 15,000 characters Alternative response formats to try: Instead of
{"result": {{ $json.output }}}
, try returning the data directly as plain text or a simpler JSON structure that Retell can more easily process. This appears to be the same issue reported by other users where tool call invocations and results are missing content in the transcript [(1) ]() . The problem seems to be in how the webhook response is being processed by Retell's system, not necessarily in your n8n configuration.
​ To learn more, see the sources I considered: [[1] Tool call invocations and results missing content in the transcript](https://discord.com/channels/1186424376300679209/1310721338062667797) [[2] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy I do not get why it wont work or what is wrong on n8n I get this error now " NodeOperationError: Invalid JSON in 'Response Body' field at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@aws-sdk+credential-providers@3.808.0_asn1.js@5_afd197edb2c1f848eae21a96a97fab23/node_modules/n8n-nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts:415:14) at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1254:31) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1428:22) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1761:38 at processTicksAndRejections (node:internal/process/task_queues:105:5) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+sdk-trace-base@1.30_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2338:11"
a
Thanks for the follow-up, @Nawee. I'll get back to you soon.
### Answer [(1) ]() ### Answer The "Invalid JSON in 'Response Body' field" error in n8n indicates that your JSON syntax is malformed . The issue is likely with your current format
{"result": {{ $json.output }}}
- this creates invalid JSON because
{{ $json.output }}
needs to be properly quoted if it's a string value. According to the custom function documentation, when Retell sends a POST request to your endpoint, the response can be in various formats including string, buffer, JSON object, or blob, and all these formats will be converted to string before sending to the LLM for further processing . The function result is capped at 15,000 characters to prevent overloading the LLM context window . To fix the n8n JSON error, try these approaches: 1. If your output is already a JSON object, use:
Copy code
json
   {{ $json.output }}
2. If your output is a string, use:
Copy code
json
   {"result": "{{ $json.output }}"}
3. For plain text response (often the most reliable) , set your response body to just:
Copy code
{{ $json.output }}
Based on the custom function documentation, Retell can handle various response formats . Since you're getting tool call results without content, the simplest approach might be to return the booking data as plain text rather than wrapped in JSON. The documentation shows that responses are processed and converted to string format before being sent to the LLM , so returning your formatted booking slots directly as plain text should work correctly with Retell's custom function system.
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.