I have designed a Flow to move email attachments from Dynamics 365 to SharePoint folder.
This Flow runs fine and moves attachments to the appropriate folders for individual entities.
However, after the files have moved from Dynamics 365 to SharePoint, it appears that files are corrupted and can't open.
I stored the image in SharePoint via Flow, here is what its showing:
Here is the Flow:
It seems that you are using the dynamic content of Apply to each in the File content field. Please try to use the dynamic content Attachment from the action List records to see if it will work.
I have tried switching to Attachment and Body (Content of Attachment) but still getting this error.
Any other trick I can try to get this going?
Thank you for posting a reply to a topic on the Microsoft Flow Community! It appears that the users who you have been engaging in this thread with are now awaiting your reply! Please follow-up on this thread ASAP.
Microsoft Flow Community Manager
I have had the same issue and have found the reason why its happening.
It is related to the Attachment body format being in base64 format.
Sharepoint connector expects the file content to be in binary format due to which if you directly map the attachment body you will have a corrupted file.
In the file content mapping, use the expression