[ { "id": "download_media_tab", "type": "tab", "label": "Download media", "disabled": false, "info": "Receives messages, downloads any attached media and writes it to disk.\n\nThe download node accepts the receiver's output as-is. It puts the bytes in msg.payload, the name in msg.filename and the original message in msg.telegram, which is exactly what `file out` expects.\n\nSet a Max size on the download node so a large video cannot be read into memory." }, { "id": "download_receiver", "type": "telegram client receiver", "z": "download_media_tab", "name": "receive messages", "bot": "", "sendrawevents": false, "sendnewmessage": true, "sendeditedmessage": false, "senddeletedmessage": false, "sendalbum": false, "sendcallbackquery": false, "chats": "", "blacklistchats": false, "direction": "any", "fromusers": "", "pattern": "", "x": 160, "y": 120, "wires": [["download_has_media"]] }, { "id": "download_has_media", "type": "switch", "z": "download_media_tab", "name": "has media?", "property": "payload.message.media", "propertyType": "msg", "rules": [{ "t": "nnull" }], "checkall": "true", "repair": false, "outputs": 1, "x": 370, "y": 120, "wires": [["download_media"]] }, { "id": "download_media", "type": "telegram client download", "z": "download_media_tab", "name": "download", "bot": "", "thumb": "", "maxsize": "20", "x": 560, "y": 120, "wires": [["download_write", "download_debug"]] }, { "id": "download_write", "type": "file", "z": "download_media_tab", "name": "write to disk", "filename": "filename", "filenameType": "msg", "appendNewline": false, "createDir": true, "overwriteFile": "true", "encoding": "none", "x": 760, "y": 80, "wires": [[]] }, { "id": "download_debug", "type": "debug", "z": "download_media_tab", "name": "metadata", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 750, "y": 160, "wires": [] } ]