https://retellai.com/?utm_source=discord&utm_medium=seo logo
why this json isn't valid to create a retell call ...
# ❓・ai-evy-support
m
@AI Evy why this json isn't valid to create a retell call vía API? { "from_number": "+13174636464", "to_number": "+13174636464", "override_agent_id": "agent_e63b71cc1ac20085ad01468225", "retell_llm_dynamic_variables": { "first_name": "{{ $('get memory records1').item.json.user_first_name }}", "partner_name": "NO PARTNER", "appointment_date": "{{ $('Airtable16').item.json.schedule_date }}", "appointment_time": "{{ $('Airtable16').item.json.schedule_time }}", "appointment_location": "{{ $('Airtable16').item.json.location }}", "tags":"appointment_true", "phone": "{{ $('Airtable16').item.json.phone_number }}", "email": "{{ $('Airtable16').item.json.email }}", "memory": "{{ $('get memory records1').item.json.memory }}" }
a
Thanks for tagging me @mariecurie. I'll look through relevant sources and get back to you shortly.
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
### Answer The issue with your JSON is that all values in
retell_llm_dynamic_variables
must be strings
[(1) ]() [(2) ]() . Your dynamic variables contain template expressions like
{{ $('get memory records1') .item.json.user_first_name }}
which appear to be from an automation tool (like n8n or Make.com) . Before sending the API request to Retell AI, you need to resolve these template expressions into actual string values . The Retell AI API expects the dynamic variables to look like this [(2) ]() :
Copy code
json
{
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe"
  }
}
To fix this: 1. Ensure your automation tool evaluates all template expressions before the API call [(1) ]() [(2) ]() 2. All resolved values must be strings - numbers, booleans, or other data types are not supported [(1) ]() 3. The final JSON sent to Retell should contain only plain string values, not template syntax [(1) ]() [(2) ]() For example, instead of
"first_name": "{{ $('get memory records1') .item.json.user_first_name }}"
, it should be
"first_name": "Marie"
after your automation tool processes it . **
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy why this json isn't valid to create a retell call vía API?: { "call_type": "phone_call", "from_number": "+13174636464", "to_number": "+13174636464", "direction": "outbound" "override_agent_id": "agent_e63b71cc1ac20085ad01468225", "retell_llm_dynamic_variables": { "first_name": "Sarah", "partner_name": "NO PARTNER", "appointment_date": "2025-11-06", "appointment_time": "19:30", "appointment_location": "Indianapolis", "tags":"appointment_true", "phone": "3179025591", "email": "sdaum86@outlook.com", "memory": "2025-10-30 Sarah Dom called to inquire about a vacation package offer she received for a Disney Universal Studios trip. After confirming her details and discussing the offer, she successfully booked an appointment for a travel showcase on November 6th at 7:30 PM in Indianapolis." } }
a
Thanks for the follow-up, @mariecurie. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
### Answer --- The JSON is invalid because you're missing a comma after
"direction": "outbound"
[(1) ]() . This is a syntax error that will prevent the JSON from being parsed correctly . Here's the corrected JSON structure for creating an outbound phone call :
Copy code
json
{
  "from_number": "+13174636464",
  "to_number": "+13174636464",
  "override_agent_id": "agent_e63b71cc1ac20085ad01468225",
  "retell_llm_dynamic_variables": {
    "first_name": "Sarah",
    "partner_name": "NO PARTNER",
    "appointment_date": "2025-11-06",
    "appointment_time": "19:30",
    "appointment_location": "Indianapolis",
    "tags": "appointment_true",
    "phone": "3179025591",
    "email": "sdaum86@outlook.com",
    "memory": "2025-10-30\nSarah Dom called to inquire about a vacation package offer she received for a Disney Universal Studios trip. After confirming her details and discussing the offer, she successfully booked an appointment for a travel showcase on November 6th at 7:30 PM in Indianapolis."
  }
}
Additional notes: - The
call_type
and
direction
parameters are not needed for the Create Phone Call endpoint . These are response fields, not request parameters . - The required parameters are
from_number
and
to_number
in E.164 format . - Your
override_agent_id
and
retell_llm_dynamic_variables
are correctly formatted . **
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.