https://retellai.com/?utm_source=discord&utm_medium=seo logo
Dynamic Variables From Inbound Webhook Not Passed ...
# ❓・bug-report
@AI Evy
a
Thanks for tagging me @theghost_dev. I'll look through relevant sources and get back to you shortly.
### Answer If your dynamic variables from the inbound webhook are not being used in the call, check the response JSON format. The expected format is:
Copy code
json
{
  "call_inbound": {
    "dynamic_variables": {
      "your_variable_name": "value"
    }
  }
}
[(1) ]() , [(2) ]() , [(3) ]() If the response is not wrapped in call_inbound and dynamic_variables, Retell AI will not process them. Also, ensure all variables are strings and are actually populated—test with hardcoded values to confirm. If you use a different format (like just dynamic_variables or another key) , the system will ignore the variables or throw an error [(1) ]() , [(2) ]() , [(3) ]() . If you've recently changed your webhook or agent configuration, try creating a new agent and sending a simple, hardcoded response to isolate the issue [(2) ]() .
​ To learn more, see the sources I considered: [[1] Agent not picking up dynamic variables](https://discord.com/channels/1186424376300679209/1395530229640073329) [[2] agent not receiving dynamic variables from inbound webhook response](https://discord.com/channels/1186424376300679209/1394015802402930778) [[3] Not receiving response from inbound webhook.](https://discord.com/channels/1186424376300679209/1355901739244585132) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
t
{ call_inbound: { dynamic_variables: { first_name: 'Mishael', email: '', calendarId: 'f28dXJz2Awmnnqlt8jLH', locationId: '3enLxexMDcgMfM7cRQDK', sessionId: '7Y7B9Syy6YB3fTWSsEFy', token: 'pit-a7b99a29-6508-4ec9-8058-09592f42c95d', phone: '+2347048858589', hasAppointment: false } } }
@AI Evy This is my json response i pasted above
a
Thanks for the follow-up, @theghost_dev. I'll get back to you soon.
### Answer Your JSON structure is correct for passing dynamic variables via the inbound webhook, but there are a few important requirements and troubleshooting steps to check: 1. All values in dynamic variables must be strings. In your JSON, hasAppointment is set as a boolean (false) . Retell AI requires every value in dynamic variables to be a string, so you should change false to "false" (as a string) and do the same for any other non-string values [(1) ]() . 2. If a variable is missing or not set as a string, it may cause the agent to ignore all dynamic variables for that call . 3. The structure you posted matches the expected Retell AI format:
Copy code
json
{
  "call_inbound": {
    "dynamic_variables": {
      "first_name": "Mishael",
      "email": "",
      "calendarId": "f28dXJz2Awmnnqlt8jLH",
      "locationId": "3enLxexMDcgMfM7cRQDK",
      "sessionId": "7Y7B9Syy6YB3fTWSsEFy",
      "token": "pit-a7b99a29-6508-4ec9-8058-09592f42c95d",
      "phone": "+2347048858589",
      "hasAppointment": "false"
    }
  }
}
Make sure all dynamic variable values are strings . 4. If you recently changed the agent configuration or webhook, try republishing the agent, and test with a simple hardcoded response where all variables are strings , [(2) ]() . 5. If issues persist, sometimes Retell AI agents may stop recognizing dynamic variables after certain webhook or function changes. In such cases, creating a new agent or resetting the webhook assignment at the phone number level can help resolve binding issues . For reference, see the official documentation: [Dynamic Variables]() and [Inbound call webhook]() .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Agent not recognizing dynamic_variables even though response JSON is correct](https://discord.com/channels/1186424376300679209/1354000738346598431) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
o
Hello @theghost_dev
Did you mentioned them in your prompt ?
for example user name :{{first_name}} note : you have to put them in {{ }}
t
Yeag, i figured out the issue it was because i was passing false(boolean) instead of "false" (string) type
o
Good.