Excel File Corrupt - Email Attachment to File Folder
I'm trying to create a flow that scrapes the email attachments from a specific sender, and then saves the excel file to a folder on the shared drive with a new name. I can deliver the file just fine, but the file that's deposited in the requested location opens a 1kb corrupt file. I also tried going back and changing the file name to its original content, but that does not seem to change the result.
Can you guys help me figure out where I've gone wrong?
The trigger is an email from a sender (I have myself as the test)
Next is the variable I'm creating for the attachment name.
Next is apply to each for all the attachments. I've found that many emails include signature pictures as attachments.
The condition then looks at all those attachments to see which one is the excel file. If it's not an excel file, the attachment is ignored. Else, we move on.
Then, from there, I compose the variable name which is just the expression: concat('upload', '.', 'xlsx')
Then create the file with the correct file path.
File name is just upload.xlsx.
Content is the dynamic Attachments Content.
The result is:
And when I try and open:
I tried to just leave the original attachment name, but even when I do that, the result is the same.