oreks
01/20/2026, 11:08 AMAI Evy
01/20/2026, 11:08 AMAI Evy
01/20/2026, 11:08 AMuser_id from your call metadata to a custom function webhook, you should use dynamic variables (retell_llm_dynamic_variables) instead of metadata. [(1) ]()
The metadata field is for storage purposes only and is not used for processing. [(2) ]() However, retell_llm_dynamic_variables allows you to inject key-value strings into prompts and tools. [(1) ]()
When creating your call, include the user_id in `retell_llm_dynamic_variables`:
javascript
const registerCallResponse = await retell.call.createPhoneCall({
from_number: '+14157774444',
to_number: '+12137774445',
retell_llm_dynamic_variables: {
user_id: 'your_user_id_here'
}
}) ;
Then in your custom function, you can reference this dynamic variable as a parameter. When configuring your function node, you would pass the dynamic variable (e.g., user_id) as a parameter to your webhook. [(3) ]()
The webhook will receive the dynamic variable values you pass as parameters in the function configuration.AI Evy
01/20/2026, 11:08 AMAI Evy
01/20/2026, 11:08 AMoreks
01/20/2026, 11:09 AMAI Evy
01/20/2026, 11:09 AMoreks
01/20/2026, 11:12 AMAI Evy
01/20/2026, 11:12 AMAI Evy
01/20/2026, 11:12 AMretell_llm_dynamic_variables – which injects values into prompts and tools (meaning the LLM has access) [(1) ]()
- metadata – which is for storage purposes only and is not used for processing
Neither of these options appears to meet your requirement of passing data to a webhook while keeping it hidden from the LLM.
Check out these potentially useful sources:
- [Function Calling Overview]()
- [Function Node Overview]()
For this specific use case, I'd recommend reaching out to:
- [Contact Sales]()
- [GitHub]()
Would you like me to try providing a general answer based on my broader knowledge instead?AI Evy
01/20/2026, 11:12 AMAI Evy
01/20/2026, 11:12 AMoreks
01/20/2026, 11:31 AMAI Evy
01/20/2026, 11:31 AMAI Evy
01/20/2026, 11:31 AMjson
{
"type": "object",
"properties": {
"last_name": {
"type": "string",
"const": "{{last_name}}"
},
"order_id": {
"type": "number",
"const": 1234
}
}
}
Using "const": "{{user_id}}" means the dynamic variable value gets passed directly to your webhook without the LLM needing to determine or reason about it.
Additionally, for query parameters in your custom function configuration, you can set const values that will be applied directly rather than resolved by the LLM.
This approach keeps the user_id flowing through to your webhook while minimizing LLM involvement with that specific value.AI Evy
01/20/2026, 11:31 AMAI Evy
01/20/2026, 11:31 AM