The Inbound Agent does not sends the caller phone number in every tool. Sometime the agent sends the phone number and sometime it doesn’t sends the phone number. The agent is very inconsistent with the data it is sending through tools to n8n. Please help me resolve this inconsistency as soon as possible.
Hello @levelxsuccess
Could you please share the relevant Call IDs and Agent ID.
This will help us investigate the issue further.
Thank you.
sure
this is the agent id : agent_cf43170d813e9a08758eea26f6
this is the call id: call_a725e4361dfd891e26baeb94a6c
Hello @levelxsuccess
I have escalated your issue to the relevant team. As soon as I receive any updates, I’ll let you know. Thank you for your patience!
Best Regards
Hello @levelxsuccess
This isn’t the agent behaving randomly, it’s a config mismatch on the inbound side. Two things are happening on call_a725e4361dfd891e26baeb94a6c:
- Your tool parameter descriptions on book_appointment (and the other intake tools) tell the model to “use the value from {{phone}} / {{name}} / {{ghl_contact_id}} dynamic variable.” Those variables get populated on outbound calls from your CRM, but on inbound calls Retell’s built-in caller-number variable is {{user_number}} — {{phone}} isn’t populated automatically.
- Your inbound webhook (the n8n workflow that responds to call_inbound) is returning the dynamic variables as literal placeholder strings — e.g. “caller_phone”: “{{ $json.call_inbound.dynamic_variables.caller_phone }}” — instead of resolved values. So even the fallback variables you defined don’t carry real data into the prompt or tools.
That’s why tools whose descriptions reference those variables (book_appointment) go out with an empty contact_phone, while tools whose descriptions don’t (cancel_appointment, search_create_contact) get filled in from what the model heard in the transcript. Two fixes and it becomes consistent:
- In the tool parameter descriptions for book_appointment and the other intake tools, replace {{phone}} with {{user_number}} for the caller phone, and either remove the {{name}} / {{email}} / {{ghl_contact_id}} instructions on the inbound agent or gate them on values you actually collected during the call.
- Fix the n8n call_inbound webhook so the call_inbound.dynamic_variables object returns resolved values — right now the workflow node isn’t evaluating the {{ $json… }} expressions before returning JSON.
Best Regards
Hi, it is likely that there is a faulty mapping of the gathered phone number variable in Retell and what it is mapped to in your N8N hook. Try investigate the connection between your n8n hook and retell to see what data is being called and if it is templated or if it is just grabbing what it thinks you want
Let me try this, and I will let you know, wether this worked or not.