I am trying to download and access the text inside an XML file attachment in an Outlook email. I can get the email, and the attachment shows in the UI with a ‘Download’ button, but I can’t read the content in future nodes. I have tried using {{ $binary.data.fileName }} and {{ $binary.data }} and tried ‘extract from file’ and ‘convert to file’ nodes with no luck.
I either get a successful run with no error but no data field, a ‘value is not set’ error when using {{ $binary.data.fileName }} or an ‘[object Object] not set error’ when using {{ $binary.data }}.
While it is an XML text file, and I can download it manually and read the content using the Download button to confirm this, the mime type is showing as ‘application/x-msdownload’ and there is no preview/view button like there is for other attachements, if that has anything to do with it?
Please share your workflow
This is all run on the cloud version of n8n
EDIT:
I can see the downalod button for the file in the UI, which works fine. But in the schema there is no reference to the data or any download URL:
Thank you so much for getting back to me! Unfortunately I’m not getting the same results, I’ve simplified my workflow down to try and match what you have and included it below.
I think that something to do with the way Outlook is supplying the file as ‘application/x-msdownload’ mime type rather than text/xml might be something to do with it, notice the output is more downloadable files and not the XML text…