Error using execute-card
# 🤝help
a
using the following code to store different informations in variables giving the error in the picture workflow.zapierSucc = false const Payload = { name : workflow.username adress : workflow.adress email : workflow.email } try { const response = await axios.post('https://hooks.zapier.com/hooks/catch/xxxxxxx/', Payload) } catch (error) {console.log(error)} any ideas?

https://cdn.discordapp.com/attachments/1133825065675399239/1133825065864138752/Screenshot_2023-07-26_201332.png

f
Hey, looks like there's an unknown reference in your execute code card.
workflow.adress
can you check the spelling?
a
Checked the spelling, its correct in the code, variable and expression
f
Does
workflow.adress
exist? If that doesn't help, would it be possible for you to share your bot so that I can take a closer look?
a
There isnt eather workflow.adress or .email or .username. Do it need an extra workflow for them? How should the workflow look like? Sharing would be a great idea too 🤗
f
Have you created those variables in your workflow?
Like so

https://cdn.discordapp.com/attachments/1133825065675399239/1134567664489091222/image.png

a
Absolutely not 🤯 where does it help me?
f
Hey, did you figure this out? Are you still getting the error?
a
Thanks for reaching out again no I did not solve it because i don’t unterstand what those mentioned variables im missing are doing
f
@adamant-gold-84199 that was just a screenshot from my bot, just wanted to confirm if you have created those variables in your workspace. Variables that you're trying to access in your execute code card.
I took another look at your code, and you've missed the commas in your object declaration.
replace
Copy code
const Payload = {
    name : workflow.username
    adress : workflow.adress
    email : workflow.email
}
with
Copy code
const Payload = {
    name : workflow.username,
    adress : workflow.adress,
    email : workflow.email
}
and you should be good to go
a
It works 🤩 okay that was simple 🙂 Thank you so much
2 Views