Telegram on reply node payload

I think a keyboard would be a better option, as it can be removed after the reply rather than a inline keyboard, which does not have a one time option.
eg.

[{"id":"94e6c6a37ead33c3","type":"inject","z":"4efa66c647b6a5d2","name":"@ 20:00","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"ON","payloadType":"str","x":300,"y":180,"wires":[["83590f1f3671fa9d"]]},{"id":"83590f1f3671fa9d","type":"switch","z":"4efa66c647b6a5d2","name":"Bedlamp aan","property":"Big_Bedroom_Bedlight","propertyType":"global","rules":[{"t":"eq","v":"ON","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":250,"y":240,"wires":[["2c2e5956.54b846"]]},{"id":"2c2e5956.54b846","type":"function","z":"4efa66c647b6a5d2","name":"build keyboard","func":"msg.payload = {};\nlet opts = {\n  reply_markup: JSON.stringify({\n    \"keyboard\": [[\n                 \"Yes\"\n                 ],[            \n                 \"No\"\n                ]],\n      'resize_keyboard' : true, \n      'one_time_keyboard' : true,\n      \"input_field_placeholder\": \"Moet het licht bij Féline uit?\"\n  })\n};\nmsg.error = false;\nmsg.payload.content = 'Moet het licht bij Féline uit?';\nmsg.payload.options = opts;\nmsg.payload.chatId = -1001361034082;\nmsg.payload.type = \"message\";\nreturn  msg;\n","outputs":"1","noerr":0,"initialize":"","finalize":"","libs":[],"x":440,"y":240,"wires":[["c8a8015.60267"]]},{"id":"c8a8015.60267","type":"telegram sender","z":"4efa66c647b6a5d2","name":"","bot":"2199975104e81aee","haserroroutput":false,"outputs":1,"x":690,"y":240,"wires":[["d719b18b.da75f8"]]},{"id":"0dd22e402b274663","type":"change","z":"4efa66c647b6a5d2","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\t\"chatId\": $$.payload.chatId,\t\"type\": \"message\",\t\"content\": $$.payload.content\t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":780,"y":340,"wires":[["c8a8015.60267","d719b18b.da75f8"]]},{"id":"d719b18b.da75f8","type":"debug","z":"4efa66c647b6a5d2","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":460,"wires":[]},{"id":"d7f1c6399aef5c6b","type":"change","z":"4efa66c647b6a5d2","name":"","rules":[{"t":"set","p":"payload.content","pt":"msg","to":"action yes taken","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":320,"wires":[["0dd22e402b274663"]]},{"id":"cab5caa1d2a8a495","type":"change","z":"4efa66c647b6a5d2","name":"","rules":[{"t":"set","p":"payload.content","pt":"msg","to":"action no taken","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":570,"y":360,"wires":[["0dd22e402b274663"]]},{"id":"d685b62cb4c8af2a","type":"telegram receiver","z":"4efa66c647b6a5d2","name":"","bot":"2199975104e81aee","saveDataDir":"","filterCommands":false,"x":230,"y":340,"wires":[["d719b18b.da75f8","9040dd51a57b6879"],[]]},{"id":"9040dd51a57b6879","type":"switch","z":"4efa66c647b6a5d2","name":"","property":"payload.content","propertyType":"msg","rules":[{"t":"eq","v":"Yes","vt":"str"},{"t":"eq","v":"No","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":390,"y":340,"wires":[["d7f1c6399aef5c6b"],["cab5caa1d2a8a495"]]},{"id":"2199975104e81aee","type":"telegram bot","botname":"elcidtestbot","usernames":"","chatids":"-1001361034082","baseapiurl":"","updatemode":"polling","pollinterval":"300","usesocks":false,"sockshost":"","socksprotocol":"socks5","socksport":"6667","socksusername":"anonymous","sockspassword":"","bothost":"","botpath":"","localbotport":"8443","publicbotport":"8443","privatekey":"","certificate":"","useselfsignedcertificate":false,"sslterminated":false,"verboselogging":false}]

Keyboard


After selecting yes

2 Likes