NGRP / node-red-contrib-viseo

Node-RED nodes OpenSourced by VISEO Technologies
Apache License 2.0
227 stars 83 forks source link

Send external messages to the user (SendCard) #88

Open xiz0r opened 6 years ago

xiz0r commented 6 years ago

Hi, I am developing a client using websockets to take the conversations in which the bot can not respond.

I have a working web client that receives messages from the bot, now I am trying to use the Message (Send Card) node but I can not find how to make this node send the response text to the user. In all the cases that probe, this node always sends the response that is set in the properties of the node, it never sends the input payload.

Is it possible to use this node for this purpose?

Thanks.

Klervix commented 5 years ago

Hi,

You can use mustache in the text property of the SendCard node. Eg: "hello {payload}", with msg.payload = "xiz0r"

rcarmo commented 5 years ago

Hi there, this is not obvious at all and should be documented in the node itself. I've been looking at the send-card HTML file for a bit (which is why I came here) and it isn't listed there...

(also, most Node-RED nodes send msg.payload across as a default, so this node is not working as expected - even if the design is as intended)