How to extract username from website login details

Hi, I have a website which asks for login ID and password to enter and view contents of the website. I have integrated rasa chatbot on that website using rasa webchat interface. Now, I want that whenever a user logs in to the website, it should display “Hi username”. How do I extract username using login details of the user and also how to make the bot to utter the first message without user uttering anything?

Hi @devesh!

How do I extract username using login details of the user

How about setting the username as a slot in a custom action?

also how to make the bot to utter the first message without user uttering anything?

How about using external events?

@tyd I am using rasa webchat option to integrate rasa bot with my website. I have figured out to send first message by the bot there by just adding (initPayload: ‘/get_started{“name”:“John”}’) in my html file. It’s working. On extracting the username side, I am storing the username in slots already but as of now I am getting “John” there. How do I replace “John” with a variable name inside my HTML file because whatever I will send from HTML will gets stored in the slot? Thanks for the help.

hi @devesh , did you find a proper solution to your problem? Can you mention it here if possible. Thanks in advance!