Create message variations
# 📖tutorials
b
This is a brief tutorial that shows a simple way to create message variations. 1- Add a custom code card 2- In the card, you'll define a variable with this code: workflow.Hello= _.sample([ "Hello!", "Hi!", "Welcome!", "Nice to see you!", ]) 3- Now the variable "Hello" will take one random value you added (like the ones i put above) 4- Display the variable with a text card saying @workflow.Hello Now you have succesfully created variations of the same message. Hope it helps!
c
Cheers! Thanks @brainy-summer-1041 🔥
s
Good idea !
r
Dopeee !!!
j
confused
can you show me a picture about this ?
n
Thanks for sharing this! I copied the code and stored the new variable, but it returns an empty text field message...
c
Feel free to post in #1111009377525186570 so we can help you
b
You have to create the variable separately
It doesn’t automatically create
Create it and then use the code
f
Nice
I like that 😄
j
idk what this is :/
can i have an example please ?
g
Hello, I can't create interactivity with questions and answers, can someone help me?
b
What do you mean? Be specific
c
It would be super helpful if you could provide an example so we can better understand what you are struggling with.