Skip to content

Instantly share code, notes, and snippets.

@leedrch
Created December 25, 2018 15:32
Show Gist options
  • Save leedrch/12b6d3c16ac89634e58be775b6c0bae1 to your computer and use it in GitHub Desktop.
Save leedrch/12b6d3c16ac89634e58be775b6c0bae1 to your computer and use it in GitHub Desktop.
Flow example - Telegram bot API
[{"id":"be902a7a.fab0f8","type":"inject","z":"5568683d.9c2528","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":780,"wires":[["54241a8f.a329e4"]]},{"id":"c78178ef.496cf8","type":"http request","z":"5568683d.9c2528","name":"sample","method":"POST","ret":"obj","url":"","tls":"","x":580,"y":840,"wires":[["a96fdda1.53f73"]]},{"id":"a96fdda1.53f73","type":"debug","z":"5568683d.9c2528","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":840,"wires":[]},{"id":"ba3069aa.03c708","type":"function","z":"5568683d.9c2528","name":"test","func":"recv = msg.payload.content;\ncheck = \"test\"\nif (recv == check) {\n msg.payload = \"test~! Good!\";\n return msg;\n}","outputs":1,"noerr":0,"x":410,"y":840,"wires":[["c78178ef.496cf8"]]},{"id":"54241a8f.a329e4","type":"template","z":"5568683d.9c2528","name":"test","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"=== Message Test~! ===","output":"str","x":410,"y":780,"wires":[["c3c15c5.43e7da"]]},{"id":"c3c15c5.43e7da","type":"http request","z":"5568683d.9c2528","name":"sample","method":"POST","ret":"obj","url":"","tls":"","x":580,"y":780,"wires":[["6cc2c66a.490788"]]},{"id":"6cc2c66a.490788","type":"debug","z":"5568683d.9c2528","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":770,"y":780,"wires":[]},{"id":"be2ebdbd.e28e2","type":"telegram receiver","z":"5568683d.9c2528","name":"T_recv","bot":"a535d6a4.22a118","saveDataDir":"TelegramFiles","x":230,"y":840,"wires":[["ba3069aa.03c708"],[]]},{"id":"a69d2243.43d0c","type":"comment","z":"5568683d.9c2528","name":"Readme","info":"\nInsert Url in http request node\n\nAdd Telegram bot in Telegram receiver\n\n\n","x":220,"y":720,"wires":[]},{"id":"a535d6a4.22a118","type":"telegram bot","z":"","botname":"samplebot","usernames":"","chatids":"","baseapiurl":"","pollinterval":"300"}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment