https://retellai.com/?utm_source=discord&utm_medium=seo logo
why is the extraction of Dynamic variables failing...
# ❓・ai-evy-support
a
@AI Evy why is the extraction of Dynamic variables failing, it keeps saying "error parsing JSON"
a
Thanks for tagging me @angel032080. I'll look through relevant sources and get back to you shortly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer
message has been deleted
a
also how do you fix if the caller does not convert the relative times to exact date, @AI Evy
a
Thanks for the follow-up, @angel032080. I'll get back to you soon.
### Answer
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
message has been deleted
a
@AI Evy
a
Thanks for the follow-up, @angel032080. I'll get back to you soon.
For dynamic variables in general, ensure all values in
retell_llm_dynamic_variables
are strings [(2) ]() . Numbers, booleans, or other data types are not supported . For the relative time conversion issue, this is a known challenge with agents handling dates [(3) ]() . The community has noted that agents are generally bad with dates, especially when users say things like "next weekend in the morning" . One user mentioned that the built-in cal.com integration is more for demo purposes and doesn't work well in production when conversations involve "relative dates" like "tomorrow, next week, this friday, etc." . A working approach involves being very specific in your prompts about date handling [(4) ]() . For example, explicitly instructing the agent to convert today's date using
{{current_time}}
to the appropriate timezone before making requests to ensure the requested time is not in the past . Check out these potentially useful sources: [Dynamic Variables]() , [Integrate any system with custom function]() Would you like me to provide a general answer based on my knowledge about handling these specific issues?
### Answer I see you're having issues with dynamic variable extraction and JSON parsing errors, plus problems with relative time conversion. For the JSON parsing error with dynamic variables, this appears to be a common issue [(1) ]() . One solution that has worked for users is using a specific return format in your webhook response :
Copy code
json
{
  "call_inbound": {
    "dynamic_variables": {
      "caller_name": " "
    }
  }
}
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://discord.com/channels/1186424376300679209/1356680357084135558) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Discord message from @melvinglenford on 2025-03-06](https://discord.com/channels/1186424376300679209/1186462578310910112/1347206753783250995) [[4] Discord message from @qcumbers1_cc on 2025-03-06](https://discord.com/channels/1186424376300679209/1186462578310910112/1347213438430216334) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
no im talking about dynamic variables within the conversational nodes
a
Thanks for the follow-up, @angel032080. I'll get back to you soon.
a
@AI Evy
a
### Answer For dynamic variables within conversational nodes, the key issue is often syntax-related [(1) ]() . Dynamic variables must use the exact format
{{variable_name}}
without any extra spaces . A common problem is accidentally adding spaces like
{{ provider_info }}
instead of
{{provider_info}}
. In conversation flow, dynamic variables work in several places [(2) ]() : - Prompts and agent instructions - Begin messages - Tool configurations including custom function URLs and descriptions For the Extract Dynamic Variable Node specifically, you can create variables of different types [(3) ]() : - Text - Any word or sentence - Number - A numeric value - Enum - A value from a predefined list - Boolean - True or false When working with complex data structures in dynamic variables, ensure you're accessing nested properties correctly [(4) ]() . For example, use
data.locations[0].id
rather than just
locations[0].id
. If you're still getting JSON parsing errors, verify that: 1. Your variable syntax has no extra spaces [(1) ]() 2. You're accessing nested object properties with the correct path [(4) ]() 3. All dynamic variable values are strings when passed via API [(2) ]()
​ To learn more, see the sources I considered: [[1] Issue with Dynamic Variables.](https://discord.com/channels/1186424376300679209/1336469878068219904) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[4] dynamic variables in function query parameters are not parsed](https://discord.com/channels/1186424376300679209/1414306451656151291) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
hmm ok all i wanted to extract say is preferred_date and preferred_time. and its in number form why am i still getting an error?
@AI Evy
a
Thanks for the follow-up, @angel032080. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] extract variable node transition](https://discord.com/channels/1186424376300679209/1393706083108786357) ​
### Answer The issue with your Extract Variable node might be related to data type handling. According to the documentation, all values in
retell_llm_dynamic_variables
must be strings [(1) ]() . Numbers, booleans, or other data types are not supported . Even though you're extracting
preferred_date
and
preferred_time
as numbers, the Extract Variable node in conversation flow might be expecting string outputs. From the Discord discussions, there have been issues with variable extraction where sample agents had incorrect configurations [(2) ]() . One user experienced similar problems and was advised to create a new agent from scratch rather than using imported sample agents, which resolved the extraction issues . For conversation flow Extract Variable nodes, you can extract different types including Text, Number, Enum, and Boolean. However, when these variables are used elsewhere in the system, they need to be handled as strings [(1) ]() . Try these troubleshooting steps: 1. Ensure your variable names use exact syntax
{{preferred_date}}
and
{{preferred_time}}
without extra spaces 2. Check if your agent was imported from a sample - if so, try creating a fresh agent [(2) ]() 3. Verify that the extracted values can be properly converted to strings when passed to other parts of the system If the issue persists with a properly configured agent, it might be related to how the conversation flow handles the extracted numeric data internally.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy why is the conversational nodes not working nad just keeps referencing the knowledgebase?
a
Thanks for the follow-up, @angel032080. I'll get back to you soon.
### Answer When conversation flow nodes keep referencing the knowledge base instead of following the conversation flow logic, this typically indicates an issue with how the conversation flow is configured or how the nodes are structured [(1) ]() . The debug guide suggests several potential causes and solutions : Issue: Agent is not following instructions within a node If your conversation nodes aren't being followed properly, try these approaches : 1. Split the node into multiple nodes - If a node contains too many instructions, the agent might inconsistently follow them 2. Change the node model - If the instructions are concise but the agent struggles to follow them, try using a more capable LLM model for this node 3. Add conversation finetune examples - To achieve a specific response style, add conversation finetune examples 4. Adjust the LLM temperature - If the agent's responses are inconsistent, try adjusting the LLM temperature Potential Configuration Issues: Check that your conversation flow is properly structured with: - Clear node instructions [(2) ]() [(3) ]() - Proper edge transitions between nodes - Correct
start_node_id
configuration The conversation flow should have nodes defined like this [(2) ]() :
Copy code
javascript
"nodes": [
  {
    "id": "start",
    "type": "conversation",
    "instruction": {
      "type": "prompt",
      "text": "Greet the customer and ask how you can help them."
    },
    "edges": [
      {
        "id": "edge_1",
        "transition_condition": {
          "type": "prompt",
          "prompt": "Customer wants to book appointment"
        },
        "destination_node_id": "book_appointment"
      }
    ]
  }
]
If the agent keeps defaulting to knowledge base responses instead of following your conversation flow, it suggests the flow logic isn't properly guiding the conversation through the defined nodes and edges [(1) ]() .
​ To learn more, see the sources I considered: [[1] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[3] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
yes im using 4.1 model
a
Thanks for the follow-up, @angel032080. I'll get back to you soon.
a
@AI Evy
a
### Answer ### Answer Since you're using the GPT-4.1 model and experiencing conversation flow issues, this might be related to known conversation flow problems that have been reported [(1) ]() [(2) ]() . Based on the available sources, there are several documented issues with conversation flow agents: Known Issues with Conversation Flow: - Conversation flow agents have experienced problems where they stop speaking after function calls or transitions [(1) ]() - Function nodes in conversation flows have had issues specifically with telephony/voice calls, while working fine in text chat [(2) ]() - These issues were reported as working previously but then stopping without any changes made to the agent [(1) ]() Potential Solutions: For transition issues in conversation flows, one workaround that has been suggested is using
1=1
instead of "skip response" for extract variable nodes . This ensures the transition condition is always met since
1=1
is always true . Model Configuration: Your conversation flow should be configured with proper model choice [(3) ]() :
Copy code
javascript
"model_choice": {
  "type": "cascading",
  "model": "gpt-4.1",
  "high_priority": true
}
Conversation Flow Structure: Ensure your nodes are properly structured with clear instructions and edges :
Copy code
javascript
"nodes": [
  {
    "id": "start",
    "type": "conversation",
    "instruction": {
      "type": "prompt",
      "text": "Greet the customer and ask how you can help them."
    },
    "edges": [
      {
        "id": "edge_1",
        "transition_condition": {
          "type": "prompt",
          "prompt": "Customer wants to book appointment"
        },
        "destination_node_id": "book_appointment"
      }
    ]
  }
]
Since these appear to be platform-wide issues that were being investigated by the Retell team [(1) ]() [(2) ]() , you may want to contact support directly for the most current status and solutions.
​ To learn more, see the sources I considered: [[1] Conversational workflows stopped working](https://discord.com/channels/1186424376300679209/1412495726646136942) [[2] Discord message from @momsramen on 2025-07-22](https://discord.com/channels/1186424376300679209/1186462578310910112/1397031478965043312) [[3] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
so when will this be fixed?
@AI Evy
a
Thanks for the follow-up, @angel032080. I'll get back to you soon.
### Answer I don't have specific information about when these conversation flow issues will be fixed, as the official documentation doesn't include timelines for bug fixes or feature updates [(1) ]() . Based on the documentation, when conversation flow agents aren't working properly, the recommended troubleshooting steps include : For agents not following instructions within nodes: - Split complex nodes into multiple simpler nodes - Change the node model to a more capable LLM - Add conversation finetune examples - Adjust the LLM temperature For node transition issues: - Review your transition conditions to ensure they precisely match your intended triggers - Add transition finetune examples - Add more nodes to cover edge cases, particularly global nodes for handling unexpected situations For Extract Dynamic Variable Node issues specifically: The node supports different variable types including Text, Number, Enum, and Boolean [(2) ]() . However, there have been reported issues with transitions in Extract Variable nodes [(3) ]() . For immediate support with these issues, I recommend: *Visit [Contact Sales]() * *Visit [) * Would you like me to provide a general answer based on my knowledge about typical software development timelines for bug fixes?
​ To learn more, see the sources I considered: [[1] Debug guide](https://docs.retellai.com/build/conversation-flow/debug-guide) [[2] Extract Dynamic Variable Node](https://docs.retellai.com/build/conversation-flow/extract-dv-node) [[3] extract variable](https://discord.com/channels/1186424376300679209/1414908562999742515) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.