Technical Issues with Node red and Watson

Hi,

We have been having issues with our integration with node red and Watson.

  1. We have been trying to pull recognized entities from Watson into node red. We have seen the guide however still have trouble with it. If anyone has another way or has seen another guide to do it would be very appreciated.

  2. Every time we send a message with telegram to Watson from node red, we get one message back. However, some of our dialogs send back more than one message. We aren't sure on how to make sure that every time a user sends a message, to receive all messages from Watson be it 1 or many.

Currently these are our two biggest problems, any help appreciated.

Hi @samblighty

First, I assume you mean Watson Assistant here? "Watson" is a generic name applied to lots of different services.

The message returned from the Watson Assistant node contains information about all of the entities it has recognised. Use the Debug sidebar to explore the full message structure and see what is there.

For your second question, again, explore the full message structure using the Debug sidebar. I believe the message will include all of the responses.

Hi,

Yeah Its Watson assistant, sorry wasn't clear about that before.

We current use this to get info from the assistant:

msg.payload = {
chatId : msg.chatId,
type : "message",
content : msg.payload.output.text[0]};
return msg;

Im assuming our issue lies on how we take content?

If I remember correctly, msg.payload.output.text is an array of all responses. Most of the time it'll have one element (text[0]), but it could have others.

This is why I suggest you pass the message to a debug node so you can explore the full structure of the message.