https://retellai.com/?utm_source=discord&utm_medium=seo logo
has anyone had any luck getting retell to send par...
# ❓・ai-evy-support
p
@AI Evy has anyone had any luck getting retell to send parameters to a node js backend function? I have the custom function set up and it says in the chat logs that it knows the email to use in the Post request but then it literally sends {{email}} instead of the email
a
Thanks for tagging me @punk8357. I'll look through relevant sources and get back to you shortly.
### Answer This issue sounds like you might be using dynamic variables incorrectly. Based on the documentation, there are two different contexts where variables work in Retell: For Custom Functions: When defining parameters for custom functions, you use JSON schema format to define the parameters that the LLM will populate [(1) ]() [(2) ]() . The LLM should automatically extract values and pass them as arguments in the
args
object when making the POST request to your endpoint . For Dynamic Variables: Dynamic variables like
{{email}}
are used for extracting values from API responses and referencing them later in conversations . These are set in the "response variables" section and are meant to be used in prompts or other parts of the conversation flow . Request Structure: When Retell sends a POST request to your Node.js backend, the structure should be :
Copy code
json
{
  "name": "function_name",
  "call": "call_object",
  "args": {
    "email": "actual_email_value"
  }
}
[(1) ]() , [(2) ]() If you're seeing
{{email}}
in the POST request instead of the actual email value, it suggests the LLM isn't properly extracting the email from the conversation. Make sure your function parameter schema is correctly defined and that your prompt explicitly instructs the LLM when and how to call the function with the email parameter . One community member mentioned that trailing slashes in URLs can cause issues with custom functions [(3) ]() , so double-check your endpoint URL format as well.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] Custom Tool Function Call sends a "GET" from Retell to my URL and not a "POST" . Empty request body.](https://discord.com/channels/1186424376300679209/1284824056801132678) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy I can see the correct parameters in the tool invocation but then they arent sent to the function. Why is this?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer If you can see the correct parameters in the tool invocation but they're not being sent to your function, this could be related to several potential issues based on the documentation. Request Structure Verification: When Retell sends a POST request to your endpoint, it should include the parameters in the
args
object [(1) ]() [(2) ]() :
Copy code
json
{
  "name": "the name of the custom function",
  "call": "the call object for you to get more context about the call",
  "args": "the arguments for the custom function, as a JSON object"
}
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[3] Custom Tool Function Call sends a "GET" from Retell to my URL and not a "POST" . Empty request body.](https://discord.com/channels/1186424376300679209/1284824056801132678) ​
Common Issues to Check: 1. HTTP Method Configuration: Ensure you've selected POST, PATCH, or PUT as your HTTP method, since parameters are only available for these methods . GET requests don't support parameter definitions. 2. Endpoint URL Format: One community member found that a trailing slash in the URL caused issues with custom functions [(3) ]() . Verify your endpoint URL doesn't have formatting issues. 3. Parameter Schema Definition: Your parameter schema must be properly defined using JSON schema format [(1) ]() [(2) ]() . The schema should include
"type": "object"
at the top level. 4. Request Headers: Retell includes specific headers with the request : - `X-Retell-Signature`: encrypted request body using your secret key -
Content-Type: application/json
Debugging Steps: - Log the entire request body your Node.js backend receives to see exactly what Retell is sending - Verify your parameter schema follows the JSON schema format correctly - Check that your endpoint is configured to handle POST requests (not GET) - Ensure there are no URL formatting issues like trailing slashes If the tool invocation shows correct parameters but your function isn't receiving them, the issue is likely in the HTTP method configuration, URL format, or how your backend is parsing the request body.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
get requests dont support query parameters? its in the UI @AI Evy. I can see that retell AI is sending the work email instead of the email it has in the tool invocation
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[3] How to pass query URL parameters from conversation to GET request](https://discord.com/channels/1186424376300679209/1384523020110008420) ​
### Answer You're correct that GET requests do support query parameters in the UI [(1) ]() [(2) ]() . The documentation shows that you can set query parameters for GET requests, and these can include dynamic variables . However, there's a known issue with dynamic variables in query parameters for GET requests. According to community discussion, dynamic variables like
{{email}}
don't get properly resolved in GET request query parameters - they get sent as literal text instead of the actual values [(3) ]() . The community discussion reveals that when using GET requests with dynamic variables in query parameters, the variables don't get set and are passed as literal strings like
{{email}}
instead of the actual email value . Current Workaround: The recommended solution is to use POST requests instead of GET requests . With POST requests, you can define parameters using JSON schema format, and the LLM will properly extract and pass the values in the
args
object [(1) ]() [(2) ]() . Why This Happens: The issue appears to be that dynamic variables can't be set directly in calls yet - they need to be extracted using custom functions with JSON parameters and then sent back to the call as dynamic variables [(3) ]() . When using GET requests, this extraction process doesn't work properly for query parameters. Solution: Switch to using POST, PATCH, or PUT requests where parameter definitions are fully supported [(1) ](
on-flow/custom-function) [(2) ]() , or implement a backend layer that handles the GET request conversion as suggested in the community discussion [(3) ]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@максим