Watson Assistant V2 multi-user test

Flow to test multi-user using Watson Assistant V2

[{"id":"7fdf051f.a2c39c","type":"watson-assistant-v2","z":"8199440.86d4dc","name":"","service-endpoint":"","assistant_id":"ff9c4ca4-5a64-4ce9-b8a6-191ae90dab4f","debug":false,"restart":false,"return_context":true,"alternate_intents":false,"multisession":false,"timeout":"","optout-learning":false,"x":450,"y":120,"wires":[["6019d9f4.72a0f8","20e671e0.6bb19e"]]},{"id":"fcf591b3.c1ca4","type":"http in","z":"8199440.86d4dc","name":"","url":"/chat","method":"get","upload":false,"swaggerDoc":"","x":80,"y":120,"wires":[["2c865aae.ffd516"]]},{"id":"2c865aae.ffd516","type":"change","z":"8199440.86d4dc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"req.query.mensagem","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":120,"wires":[["7fdf051f.a2c39c"]]},{"id":"6019d9f4.72a0f8","type":"http response","z":"8199440.86d4dc","name":"","statusCode":"","headers":{},"x":670,"y":100,"wires":[]},{"id":"1447f49f.b4519b","type":"inject","z":"8199440.86d4dc","name":"","topic":"","payload":"Mensagem","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":320,"wires":[["6945277d.bc1118","e7aeac43.61d42","340ba4af.005cdc","783138a2.4f6e58"]]},{"id":"e53738b8.2ebb08","type":"http request","z":"8199440.86d4dc","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":530,"y":262,"wires":[["65981b0c.ce03f4"]]},{"id":"2661d0dd.38e9c","type":"debug","z":"8199440.86d4dc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":810,"y":420,"wires":[]},{"id":"20e671e0.6bb19e","type":"debug","z":"8199440.86d4dc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":680,"y":160,"wires":[]},{"id":"6945277d.bc1118","type":"function","z":"8199440.86d4dc","name":"A: Good morning","func":"msg.url = \"http://169.48.77.36:1880/chat?message=Good morning\";\nmsg.topic = \"A\";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":262,"wires":[["e53738b8.2ebb08","9c848eb9.6829b","98c91992.37aff8","77e32a7.1d870d4"]]},{"id":"65981b0c.ce03f4","type":"json","z":"8199440.86d4dc","name":"","property":"payload","action":"","pretty":false,"x":697,"y":319,"wires":[["a4555919.b32a78"]]},{"id":"e7aeac43.61d42","type":"function","z":"8199440.86d4dc","name":"B: Hello","func":"msg.url = \"http://169.48.77.36:1880/chat?message=Hello\";\nmsg.topic = \"B\";\nreturn msg;","outputs":1,"noerr":0,"x":299,"y":302,"wires":[["e53738b8.2ebb08","9c848eb9.6829b","98c91992.37aff8","77e32a7.1d870d4"]]},{"id":"a4555919.b32a78","type":"function","z":"8199440.86d4dc","name":"Mesage","func":"msg.payload = msg.topic + \" - \" + msg.payload.output.generic[0].text;\nreturn msg;","outputs":1,"noerr":0,"x":827,"y":319,"wires":[["2661d0dd.38e9c"]]},{"id":"340ba4af.005cdc","type":"function","z":"8199440.86d4dc","name":"A: Good morning","func":"msg.url = \"http://169.48.77.36:1880/chat?message=Good morning\";\nmsg.topic = \"A\";\nreturn msg;","outputs":1,"noerr":0,"x":330,"y":341,"wires":[["e53738b8.2ebb08","9c848eb9.6829b","98c91992.37aff8","77e32a7.1d870d4"]]},{"id":"783138a2.4f6e58","type":"function","z":"8199440.86d4dc","name":"B: Hello","func":"msg.url = \"http://169.48.77.36:1880/chat?message=Hello\";\nmsg.topic = \"B\";\nreturn msg;","outputs":1,"noerr":0,"x":300,"y":379,"wires":[["e53738b8.2ebb08","9c848eb9.6829b","98c91992.37aff8","77e32a7.1d870d4"]]},{"id":"9c848eb9.6829b","type":"http request","z":"8199440.86d4dc","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":530,"y":301,"wires":[["65981b0c.ce03f4"]]},{"id":"98c91992.37aff8","type":"http request","z":"8199440.86d4dc","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":530,"y":341,"wires":[["65981b0c.ce03f4"]]},{"id":"77e32a7.1d870d4","type":"http request","z":"8199440.86d4dc","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"","tls":"","persist":false,"proxy":"","authType":"","x":530,"y":379,"wires":[["65981b0c.ce03f4"]]}]

Flow Info

Created 5 years, 2 months ago
Rating: 5 1

Owner

Actions

Rate:

Node Types

Core
  • change (x1)
  • debug (x2)
  • function (x5)
  • http in (x1)
  • http request (x4)
  • http response (x1)
  • inject (x1)
  • json (x1)
Other

Tags

  • Watson
  • Assistant
  • V2
  • Test
  • Multi-user
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option