Now it works
I am posting the soluton...in case someone is looking for it in the future:
[{"id":"b362cab5.0c908","type":"json","z":"e05dcd57.8b6d6","name":"","property":"payload","action":"","pretty":false,"x":330,"y":140,"wires":[["cca9d95f.c46918"]]},{"id":"cca9d95f.c46918","type":"function","z":"e05dcd57.8b6d6","name":"","func":"var videofileList = [];\nvar videofiles = msg.payload.files;\nfor (var i =0 ; i < videofiles.length; i++){\n videofileList.push({payload:videofiles[i]});\n}\nreturn [videofileList];","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":140,"wires":[["5cef4.3616110cc"]]},{"id":"5cef4.3616110cc","type":"function","z":"e05dcd57.8b6d6","name":"","func":"var newMsg = {};\nnewMsg.topic = \"message\";\nnewMsg.payload = \"http://\" + global.get('y_username') + \":\" + global.get('y_password') + \"@\" + global.get('yihack_record') + msg.payload;\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":640,"y":140,"wires":[["84498846.d619c8"]]},{"id":"84498846.d619c8","type":"change","z":"e05dcd57.8b6d6","name":"","rules":[{"t":"set","p":"method","pt":"msg","to":"get","tot":"str"},{"t":"set","p":"url","pt":"msg","to":"payload","tot":"msg"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":140,"wires":[["9a0ad461.d7679"]]},{"id":"7381f27d.958964","type":"mqtt in","z":"e05dcd57.8b6d6","name":"yihack/motion_files","topic":"yihack/motion_files","qos":"2","datatype":"auto","broker":"5779f087.962a9","x":150,"y":140,"wires":[["b362cab5.0c908"]]},{"id":"9a0ad461.d7679","type":"http request","z":"e05dcd57.8b6d6","name":"","method":"use","ret":"bin","paytoqs":"body","url":"","tls":"","persist":false,"proxy":"","authType":"","x":350,"y":220,"wires":[["47ccf24f.d65894"]]},{"id":"47ccf24f.d65894","type":"delay","z":"e05dcd57.8b6d6","name":"Limit 1 msg / 5s","pauseType":"delay","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":560,"y":220,"wires":[["7d9c9ade.e44d7c"]]},{"id":"7d9c9ade.e44d7c","type":"function","z":"e05dcd57.8b6d6","name":"Video -> Telegram-Payload","func":"var newMsg = {};\nnewMsg.topic = \"Telegram Message\";\nnewMsg.payload = { chatId: 1234567890,\n type: \"video\",\n content: msg.payload };\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":810,"y":220,"wires":[[]]},{"id":"5779f087.962a9","type":"mqtt-broker","name":"","broker":"192.168.1.100","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
It requires of course editing the MQTT broker settings and the chatId of the Telegram account