https://retellai.com/?utm_source=discord&utm_medium=seo logo
can i not sent an argument in a custom function
# ❓・ai-evy-support
w
@AI Evy can i not sent an argument in a custom function?
a
Thanks for tagging me @weroniki. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can create a custom function without arguments in Retell AI [(1) ]() . When defining parameters for a custom function, parameters are only available for POST, PATCH, and PUT requests . If you're using GET or DELETE methods, you wouldn't define parameters in the JSON schema . For POST, PATCH, and PUT requests, you define parameters using JSON schema format or JSON form . If you don't need any arguments, you can simply define an empty or minimal parameter schema. The request body sent from Retell includes the
name
of the custom function, the
call
object for context, and
args
as a JSON object . For GET and DELETE requests, the request body is empty .
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
w
@AI Evy i want to send an argument which includes dyanmic variables
a
Thanks for the follow-up, @weroniki. I'll get back to you soon.
### Answer --- Yes, you can include dynamic variables in custom function arguments [(1) ]() . Dynamic variables work in tool configurations, including custom function URLs, tool descriptions, and property descriptions [(2) ]() . You can use the
{{variable_name}}
syntax to inject personalized data . When defining parameters for your custom function using JSON schema format, you can reference dynamic variables in the property descriptions [(1) ]() . For example:
Copy code
json
{
  "type": "object",
  "properties": {
    "city": {
      "type": "string",
      "description": "The city of the weather"
    }
  },
  "required": [
    "city"
  ]
}
You can also use dynamic variables in custom function URLs and query parameters . Query parameter values can be static or include dynamic variables . For production implementation, when making outbound calls, set your variables in the
retell_llm_dynamic_variables
field, and note that all values must be strings [(2) ]() [(3) ]() .
​ 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] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Here is how that can be fixed](https://retell.discourse.group/t/here-is-how-that-can-be-fixed/23) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.