https://discord.gg/botpress logo
User Info in Schema - Address User Only by First N...
# 🤝help
i
Hi Everyone, super new non-programmer here! I try to set up a bot with user info stored in a schema, but then how can I only address the user by their first name? I can not display the user's first name only by TEXT: {{workflow.userinfo.firstname}}. And I have already tried to save the user's first name and last name separately, but the result is the same. I can only let the Bot display the entire name by TEXT: {{workflow.userinfo.name}}, but nothing happens if I ask it to show {{workflow.userinfo.firstname}}. Anyone can help me with this Day 1 question? Many thanks!
n
First name: {{workflow.userinfo.firstname}} bro try this in a text for debug if this shows nothing then the value was never stored sk make the value store in the varriable
l
If you used the name card to store the value and created a variable workflow.userinfo, then it has two keys .first and .last So workflow.userinfo.first and workflow.userinfo.last will have the first and last name. If you created it any other way, use @workflow.userinfo to get the variable structure to know how it is defined
i
Not a Bro but thank you, will try!
Sounds like an amazing tip! Will try and thank you for sharing your experience!
I have (1) set up the variable using "Person Name" (x) format, and (2) set up the Schema of user personal info. I can store the person's first and last name properly. Although I am not sure if the Schema has any added value... I will keep things this way for now! Thank you again 🙂