John Stinson
John Stinson

Reputation: 53

How to get username from user input on watson assistant in node-red?

I am using Node-red to connect IBM Watson AI assistant to connect to Facebook messenger and also fetch data from MySQL database. I actually want to take username from user and get it in node-red. So that, I can use that username in node-red to fetch data of that user from MySQL database.

Upvotes: 1

Views: 556

Answers (1)

chughts
chughts

Reputation: 4737

I am going to make some assumptions to answer this question, and hence this answer may be wide of the mark, but...

You should have your dialog ask the end user for a name. The dialog can make use of system name entities to identify the name in the input and put it into a context variable.

Your node-red flow can inspect the response from Watson Assistant and check to see if a name is stored in the context variable. If it is, and you haven't already fetched user data, then fetch the data from the MySQL database.

Of course you have user data, so your app will need to be GDPR compliant.

Upvotes: 1

Related Questions