I was using event.preview to as part of the content in an API POST and a workflow.vectara to store the response.
It worked fine for a while and then I started getting an error.
The Error Log just said: Error executing action "inline-card:Send a POST request to the Vectara API and store the response..js" in flow:Main:node:MainWorkflow
Falling back to Workflow Error
In the code editor, when I hover over the variable I get a pop-up that says:
> Cannot redeclare block-scoped variable 'workflow'.(2451)
> workflow.d.ts(1, 13): 'workflow' was also declared here.
> const workflow: any
I'm confused. To my knowledge, I have followed the variables documentation very closely.
Now I'm afraid that if I something like this happens again the bot could break while in production. Can anyone help?
https://cdn.discordapp.com/attachments/1256640869541613632/1256640869872832512/Screenshot_2024-06-29_at_10.57.46_PM.jpg?ex=66818182&is=66803002&hm=33d081fa52fcc4c602b5608176ec73ce85987e96fe2ceea006be57e78e5fb9a5&
w
wooden-beard-40210
06/29/2024, 4:11 PM
hey, if you want to store something into a workflow variable, don't use
const
wooden-beard-40210
06/29/2024, 4:12 PM
but if you want to create a variable just for this block of javascript, use it without