Right I integrated Watson Assistant with Telegram using Node Red.
It is working as expected. When sending a message it responds instantly.
So I will be a "$username" variable in the Watson responses and I am not able to assign a value to it (img1).
as the Watson node receives a paload with the content of the message sent by the telegram (img2), I don't know how to pass the user along.
And finally Watson returns the answer with one more space as it is expected to receive the variable before going through the Assistant node (img3).
the full flow is here. Now I just need to somehow assign the telegram's first_name to this $user variable
thanks in advance
CodePudding user response:
You add additional context data by adding to msg.additional_context
. eg.
msg.additional_context.user = 'XYZ'
or
msg.additional_context['user'] = 'XYZ'