How to Save Outlook Attachments to OneDrive?

Describe the problem/error/question

Objective: Get Outlook emails and download attachments to Onedrive.

What is the error message (if any)?

Error: No Binary Data Exists
This is despite the fact that the output of the nodes before the last yield binary data files.

Please share your workflow

Share the output returned by the last node

I also tried inserting a “Convert Binary to Jason” node, becaause another forum post described using that, but it didnt help.

Any guidance would be appreciated. Note I am a non-coder :frowning:

Thanks Very much

Information on your n8n setup

n8n cloud on Windows PC

Hey @ccclapp,

That error tends to mean that the node before the save doesn’t output the binary data, Looking at your workflow I suspect the search folder option doesn’t do what you are expecting so you would need to use a merge node after Outlook4 that joins up the search output so you can use it. Maybe something like the below although I am not sure what the goal is for the search folder node at the moment.

Hi @Jon

Thanks for trying to help. I dont think this is an issue for Merge node. I think it relates to how to access the Outlook attachments on n8n for OneDrive to be able to download/upload them.

Here is some updated/additional info…

Annotated workflow screenshot

Outlook4 (Download attachments) screenshot showing binary (files) data exists.

OneDrive config and input/output

Here is the workflow

NOTE: I saw om another Outlook related post you were going to open an account to try. Possibly you could also try this workflow with that account. Also note: my OneDrive is OneDrive for Business, which has a different file ID than its sharing URL (thats why I use the propr search node to obtain the file ID

Thanks, @Jon !!

Hey @ccclapp,

That looks like it could be similar, The original issue though looks like it was down to the search not returning any binary items I will see if I can get to this issue later today before I am off for a few days.

Hey @ccclapp,

I can see what is happening now, Get All messages is downloading 1 email, You are then using Get All Message Attachments which is outputting 3 items this is then calling download message attachments which is being 3 times once for each item so you are actually downloading the attachments 3 times.

There is something funky going on though as while I have 4 items outputted I actually only have 3 binary items in my small test with just 2 attachments. So I suspect in your case you don’t have 9 attachments but you might have 6(?).

What I would do is either delete the message attachment nodes as the first node is already downloading the files or turn off the download attachments option on the first node then after Get Message Attachment add a split in batches to handle each item one a time which will get it working.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.