Extracting name of user and accessing it
# 🤝help
n
So basic newbie question. I just want the bot to talk to the user by name. I set a capture parameter to ask for the name and then added that variable to the response. For some reason, it never mentions the name.
a
Thanks for posting! Do you see the rest of the response? For instance if you response text is : "hey @name, yes, I can setup an appointment for you" does it show like this : "hey , yes, I can setup an appointment for you"?
n
pretty basic test to start.
a
Are you using personality rewrite by any chance? If so, does the problem still occur when you turn it off?
n
I'll check
a
the setting changed, it's now in the gear icon near the top left, then the checkbox
n
turned it off and now it says this
a
ok, I think there are two things making this fail. It seems like username is not being saved properly. can you click the background of the flow editor, then click username in the "Variables" section in the Main Workflow Properties? (screenshot that)
it should look something like this
When you see something like [object Object] it's usually that the information was saved in a different format than just plain text. If you used the "Person name", it will save the first and last name seperately. You can access them like this : Hello @username.first Hello @username.last OR Hello @username.first @username.last
n
I had it as object. Changed to string. still not working. I'm going to start from the beginning again.
a
You can keep it as an object, just change the way you access it (see my last message) and it should work
@nice-baker-72574 did it work?
n
no. I'm going to start over.
a
this works for me, you can work backwards from this
I get this result
n
thanks. almost there.
got it to work. thanks.
r
This is an area we can improve the product but yeah, capture Person Name basically extracts it as an object { firstName; lastName }, when you try to print that as variable, is just shows [Object]. We could have default text formatters for some of these built-in Objects, so that it shows "Mark Levy" instead of [object]
n
how do I hook in my OpenAI api?
a
62 Views