What is in msg.filename and msg.folder?
The reason I am asking about msg.filename and msg.directory is that you said you had tried using them and it didn't work. I want to see your attempt to use them to solve your problem.
You have to save the file and then tell the node where it is, using those message properties.
write file node does nothing even if i set file path to /tmp/email.eml
I will try again. Feed the message that you are passing to the nextcloud node into a debug node set to Output Complete Message, and show us what that shows in the debug pane of the browser. Please try and provide the information that is asked for, not just what you think we need to see, but actually what we ask for. We cannot help if you do not provide the information.
[Edit] This is for your attempt to use msg.folder and msg.filename of course.
I Upload some PDFs to a nextcloud, not with the nextcloud node, but via dav2fs. So i mount the webdav folder directly in the filesystem and them just use the File node to save the File.
what did you ask for? u aked for msg.filename and msg.directory and i provided the out for those, claiming that i provide them is a lie
I asked:
Where have you done that?
You previously showed that msg.folder and msg.filename were undefined, but I assume that you have now changed that and are setting them to valid strings. If you feed the message into a debug node and show us what you are now sending then we may be able to say what is wrong.
man like i said here Save email attachments to Nextcloud - #19 by tty6747fg8 the email is not fetched in full there is no attachment to get to Nextcloud and the node setup is
i decided to give up on this i cant make it work
I think you are saying that Node-red is only fetching a small fraction (17000 out of 500000 characters) of the email attachment.
I am not sure your little flow inject - email-in - debug can demonstrate this satisfactorily considering (as I said above), the debug output can be truncated for large messages.
Perhaps instead of this
You could prove the assertion with a flow like this (checking the size of the file)
Or this
(where the function is something like this:)
Attachments is normally a array of objects.
I write incoming email attachment to a email directory using a split node.
[{"id":"1a88371a3c31917d","type":"inject","z":"667cec54c048503c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":300,"y":940,"wires":[["b0baa5fadfdad440"]]},{"id":"b0baa5fadfdad440","type":"e-mail in","z":"667cec54c048503c","name":"","protocol":"IMAP","server":"imap.gmail.com","useSSL":true,"autotls":"required","port":"993","authtype":"BASIC","saslformat":true,"token":"oauth2Response.access_token","box":"INBOX","disposition":"None","criteria":"UNSEEN","repeat":"300","fetch":"trigger","inputs":1,"x":430,"y":940,"wires":[["058e40b95da4b614"]]},{"id":"058e40b95da4b614","type":"split","z":"667cec54c048503c","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"attachments","x":550,"y":940,"wires":[["81a0633ac4e1f980"]]},{"id":"81a0633ac4e1f980","type":"change","z":"667cec54c048503c","name":"","rules":[{"t":"set","p":"filename","pt":"msg","to":"\"/storage/documents/email_attachments/\" & $$.attachments.filename","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"attachments.content","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":700,"y":940,"wires":[["724356920e77f41b"]]},{"id":"724356920e77f41b","type":"file","z":"667cec54c048503c","name":"","filename":"filename","filenameType":"msg","appendNewline":false,"createDir":false,"overwriteFile":"true","encoding":"none","x":860,"y":940,"wires":[["c0a50bb0d49aec5e"]]},{"id":"c0a50bb0d49aec5e","type":"debug","z":"667cec54c048503c","name":"debug 2579","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":980,"wires":[]}]