Cr4shBarcode
Cr4shBarcode3mo ago

Javascript Code not returning as a variable

I've created a javascript block to get the current date and drag-dropped it into my agent step block so that it executes first. My agent step uses an API meant to gather appointment times and it requires the current date. But for whatever reason, even though the log says that the code ran successfully, the API does not utilize the variable that it provides; it's like the variable wasn't supplied at all. What am I doing wrong? Do I need to create a path for the Javascript step? How can I connect it if it's in the same block as the agent step?
No description
3 Replies
Steve B. | IntelleSync.ai
Have you included the current date variable in your agent instructions so it knows what the date is?
Cr4shBarcode
Cr4shBarcodeOP3mo ago
I have {currentDate} as a variable inside the api web address. Can you give me an example of how to specify it for the agent? Like, is it a simple instruction line or a path or...?
No description
sensitive-blue
sensitive-blue3mo ago

Did you find this page helpful?