Nawee
10/02/2025, 9:46 AMAI Evy
10/02/2025, 9:46 AMAI Evy
10/02/2025, 9:46 AMAI Evy
10/02/2025, 9:46 AMAI Evy
10/02/2025, 9:46 AMNawee
10/02/2025, 10:24 AMAI Evy
10/02/2025, 10:24 AMAI Evy
10/02/2025, 10:24 AMAI Evy
10/02/2025, 10:24 AMAI Evy
10/02/2025, 10:24 AMNawee
10/02/2025, 10:25 AMAI Evy
10/02/2025, 10:25 AMAI Evy
10/02/2025, 10:26 AM{{current_time_[timezone]}}, not {{currenttime[Stockholm]}} [(1) ]() .
For Stockholm specifically, you would use:
{{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:
"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 .AI Evy
10/02/2025, 10:26 AMAI Evy
10/02/2025, 10:26 AMNawee
10/02/2025, 10:28 AMAI Evy
10/02/2025, 10:28 AMAI Evy
10/02/2025, 10:28 AMjson
{
"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.AI Evy
10/02/2025, 10:28 AMAI Evy
10/02/2025, 10:28 AMNawee
10/02/2025, 10:29 AMAI Evy
10/02/2025, 10:29 AMAI Evy
10/02/2025, 10:30 AM{{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:
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) ]() .AI Evy
10/02/2025, 10:30 AMAI Evy
10/02/2025, 10:30 AMNawee
10/02/2025, 10:32 AMAI Evy
10/02/2025, 10:32 AMAI Evy
10/02/2025, 10:32 AM{"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:
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.AI Evy
10/02/2025, 10:32 AMAI Evy
10/02/2025, 10:32 AMNawee
10/02/2025, 10:34 AMAI Evy
10/02/2025, 10:34 AMAI Evy
10/02/2025, 10:34 AMjson
{
"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:
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 .AI Evy
10/02/2025, 10:34 AMAI Evy
10/02/2025, 10:34 AMNawee
10/02/2025, 11:12 AMAI Evy
10/02/2025, 11:12 AMAI Evy
10/02/2025, 11:13 AMcontent 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 contentAI Evy
10/02/2025, 11:13 AMAI Evy
10/02/2025, 11:13 AM{"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) ]() :
json
{
"response_type": "tool_call_result",
"tool_call_id": "string",
"content": "string"
}AI Evy
10/02/2025, 11:13 AMNawee
10/02/2025, 11:15 AMAI Evy
10/02/2025, 11:15 AMAI Evy
10/02/2025, 11:15 AMjson
{
"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.AI Evy
10/02/2025, 11:15 AMAI Evy
10/02/2025, 11:15 AMNawee
10/02/2025, 11:17 AMAI Evy
10/02/2025, 11:17 AMAI Evy
10/02/2025, 11:17 AM{"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:
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 :
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:
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:
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 .AI Evy
10/02/2025, 11:17 AMAI Evy
10/02/2025, 11:17 AMNawee
10/02/2025, 11:19 AMAI Evy
10/02/2025, 11:19 AMAI Evy
10/02/2025, 11:19 AMjson
{
"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 .AI Evy
10/02/2025, 11:19 AMAI Evy
10/02/2025, 11:19 AMNawee
10/02/2025, 11:22 AMAI Evy
10/02/2025, 11:22 AMAI Evy
10/02/2025, 11:22 AMjson
{
"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:
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 .AI Evy
10/02/2025, 11:22 AMAI Evy
10/02/2025, 11:22 AMNawee
10/02/2025, 11:24 AMAI Evy
10/02/2025, 11:24 AMAI Evy
10/02/2025, 11:24 AMAvailable 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:
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:
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.AI Evy
10/02/2025, 11:24 AMAI Evy
10/02/2025, 11:24 AMNawee
10/02/2025, 11:26 AMAI Evy
10/02/2025, 11:26 AMAI Evy
10/02/2025, 11:26 AM{"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:
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.AI Evy
10/02/2025, 11:26 AMAI Evy
10/02/2025, 11:26 AMNawee
10/02/2025, 11:27 AMAI Evy
10/02/2025, 11:27 AMAI Evy
10/02/2025, 11:27 AM{"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.AI Evy
10/02/2025, 11:27 AMAI Evy
10/02/2025, 11:27 AMNawee
10/02/2025, 11:29 AMAI Evy
10/02/2025, 11:29 AMAI Evy
10/02/2025, 11:29 AM{"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.AI Evy
10/02/2025, 11:29 AMAI Evy
10/02/2025, 11:29 AMNawee
10/02/2025, 11:34 AMAI Evy
10/02/2025, 11:35 AMAI Evy
10/02/2025, 11:35 AM{"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:
json
{{ $json.output }}
2. If your output is a string, use:
json
{"result": "{{ $json.output }}"}
3. For plain text response (often the most reliable) , set your response body to just:
{{ $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.AI Evy
10/02/2025, 11:35 AMAI Evy
10/02/2025, 11:35 AM