https://discord.gg/botpress logo
How to get name in the chatbot
# 🤝help
g
Hi @acceptable-gold-88171 I have created the user via chatapi { "id": "user_01J2NJV2D7NMMEE76X7HDF", "createdAt": "2024-07-13T08:20:06.695Z", "updatedAt": "2024-07-13T08:20:06.695Z", "tags": {}, "name": "3136140295" } And I will get this response user is created, now I want to get the "name" from the above response in the chatbot : How I can get this in my conversation?
f
Give ChatGPT your code and give it the same question that you asked Patrick.
g
@fresh-fireman-491 Dear what do you mean, users are stored in botpress, I want to get the user name value in botpress, If the user is registered in botpress how I get in the work flow because there are already function in botpress to get user id like event.userid I want to know how I get name like this
@fresh-fireman-491 if you have the solution then please suggest the best way
f
You want the "name" from it, right? The "3136140295" part?
d
@fresh-fireman-491 how can i set the name of the current user if i capture it during the conversation, so that the userid is associated with that name in conversations
f
Save it to a variable with the user scope