cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AlejandroPNW
Microsoft
Microsoft

Excel File Corrupt - Email Attachment to File Folder

Howdy, 

 

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?

 

Flow below: 

trigger.PNG

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.

 

action 1.PNG

 

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. 

 

action 2.PNG

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: result.PNG

 

And when I try and open: 

 

error.PNG

 

I tried to just leave the original attachment name, but even when I do that, the result is the same. 

 

What do you think? 

1 ACCEPTED SOLUTION

Accepted Solutions
AlejandroPNW
Microsoft
Microsoft

I probably should have changed the "Include Attachments" drop down to "yes" instead of "no"

 

😛

 

Don't be like me!

View solution in original post

1 REPLY 1
AlejandroPNW
Microsoft
Microsoft

I probably should have changed the "Include Attachments" drop down to "yes" instead of "no"

 

😛

 

Don't be like me!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,147)