Cr4shBarcodeC
Voiceflow Partners8mo ago
2 replies
Cr4shBarcode

How to Use the Javascript Step to Establish a Variable?

The API I'm working with requires the current date as a variable. Since I don't want the user to have to enter this information, I created a Javascript step that establishes the date in the correct format that I need. The problem is, how to I pass this variable to the API? In the documentation it states that the Javascript step can't be used to create new variables. Is there a way to introduce the variable earlier? Any YouTube tutorials I've found use a function to get the date (I'm avoiding this because I don't know how to write functions). Is there any solution to this, or am I going to have to find a way to change my Javascript code into a function step?
image.png
Was this page helpful?