https://retellai.com/?utm_source=discord&utm_medium=seo logo
Can we able to pass the dynamic variable to code n...
# ❓・ai-evy-support
a
Thanks for tagging me @gk. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can pass dynamic variables to a Code Node. In the JavaScript code editor, you have direct access to dynamic variables using the
dv
object. [(1) ]() For example, if you have a dynamic variable called
numbers
, you can access it in your Code Node like this:
Copy code
javascript
// Example: access the numbers dynamic variable
const myNumbers = dv.numbers;
// Use the variable in your code
return { result: myNumbers };
The Code Node JavaScript environment provides access to both
dv
(dynamic variables) and
metadata
(call metadata) . You can use these variables directly in your code for data transformation, calculations, or simple API calls.
​ To learn more, see the sources I considered: [[1] Code Node](https://docs.retellai.com/build/conversation-flow/code-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
g
hi