This is my flow
[{"id":"9bbc99e3.a78108","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"141cd03e.e3269","type":"string","z":"9bbc99e3.a78108","name":"photo","methods":[{"name":"endsWith","params":[{"type":"str","value":"jpg"}]}],"prop":"payload","propout":"motioneye_photo_cam_name","object":"msg","objectout":"msg","x":250,"y":360,"wires":[["b0131bd5.250b68"]]},{"id":"4e656984.3c69a8","type":"mqtt in","z":"9bbc99e3.a78108","name":"Filename cam_name","topic":"cameras/cam_name/filename","qos":"0","datatype":"utf8","broker":"","x":90,"y":380,"wires":[["141cd03e.e3269","8e41d6e0.e17568"]]},{"id":"b0131bd5.250b68","type":"switch","z":"9bbc99e3.a78108","name":"true","property":"motioneye_photo_cam_name","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":360,"wires":[["f5e97397.8159e"]]},{"id":"8e41d6e0.e17568","type":"string","z":"9bbc99e3.a78108","name":"video","methods":[{"name":"endsWith","params":[{"type":"str","value":"mp4"}]}],"prop":"payload","propout":"motioneye_video_cam_name","object":"msg","objectout":"msg","x":250,"y":400,"wires":[["cc972b6e.b2d0b8"]]},{"id":"f5e97397.8159e","type":"change","z":"9bbc99e3.a78108","name":"photo_cam_name","rules":[{"t":"set","p":"photo_cam_name","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"camera_cam_name","pt":"msg","to":"cam_name","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":360,"wires":[["38566e03.17fe72"]]},{"id":"cc972b6e.b2d0b8","type":"switch","z":"9bbc99e3.a78108","name":"true","property":"motioneye_video_cam_name","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":1,"x":370,"y":400,"wires":[["294abed.a895242"]]},{"id":"38566e03.17fe72","type":"function","z":"9bbc99e3.a78108","name":"Send jpg to Telegram","func":"msg.payload = {chatId :111111, type : 'photo', content : msg.photo_cam_name, caption: \"Motion snapshot \"+msg.camera_cam_name+\"! \"}\nreturn msg;\n\n","outputs":1,"noerr":0,"x":720,"y":360,"wires":[[]]},{"id":"294abed.a895242","type":"change","z":"9bbc99e3.a78108","name":"video_cam_name","rules":[{"t":"set","p":"video_cam_name","pt":"msg","to":"payload","tot":"msg"},{"t":"set","p":"camera_cam_name","pt":"msg","to":"cam_name","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":400,"wires":[["4a0bb081.5f1e6"]]},{"id":"4a0bb081.5f1e6","type":"delay","z":"9bbc99e3.a78108","name":"5s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":670,"y":400,"wires":[["fbdf0552.fc5958"]]},{"id":"fbdf0552.fc5958","type":"function","z":"9bbc99e3.a78108","name":"Send mp4 to Telegram","func":"msg.payload = {chatId :11111111, type : 'video', content : msg.video_cam_name, caption: \"Motion video \"+msg.camera_cam_name+\"! \"}\nreturn msg;\n\n","outputs":1,"noerr":0,"x":840,"y":400,"wires":[[]]},{"id":"3a271cc0.84b7b4","type":"comment","z":"9bbc99e3.a78108","name":"Telegram node ","info":"","x":920,"y":360,"wires":[]},{"id":"e4f2f0c6.add43","type":"comment","z":"9bbc99e3.a78108","name":"Telegram node ","info":"","x":1040,"y":400,"wires":[]}]
I’ve done one of this for each camera