web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Excel becomes corrupte...
Power Automate
Answered

Excel becomes corrupted when using Power Automate to the forward the original email with the excel

(0) ShareShare
ReportReport
Posted on by 25
The flow is to forward a specific email with an attachment to a distribution list.

The specific email has an attachment in .xlsx format. It opens fine.

However post the flow, the attachment in the forwarded email remains in the .xlsx format. 
It is slightly bigger in KB. 
However it cannot be opened.
The error message is "Excel cannot open the file 'FileName.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"

Clearly the file has been corrupted.

In the flow, an Array Variable has been initialised and the attachment is appended to the variable using "Append to Array Variable".

Assitance greatly appreciated.
Thanks,
Categories:
I have the same question (0)
  • Mark Nanneman Profile Picture
    991 Super User 2025 Season 2 on at
    Why are you storing the attachments in an array variable?  Are you using the "Forward an email" outlook action or are you composing and sending a new email?

    If you use "Forward an email (V2)" it will automatically include the file attachments of the email it's forwarding.
     

    If you want to figure out what's going wrong with the attachments you're storing in the variable, it is probably due to the way you're appending the attachments to the array.  Can you post a screenshot of it?

     
  • CO-17121326-0 Profile Picture
    25 on at
    Hi Mark, 
     
    Thanks for your reply.
     
    I couldn't find the button to reply directly to your response.
     
    Here is the flow:
     
    The email is not forwarded per se as i don't want FWD: in the subject and also the to/from text in the body of the email.
     
    Regarding the Array Variable. Is this not the correct one for attachments? I guess not!
     
    In respect, of the Array Variable, here are the details:
     
     
    Thanks,
     
  • Verified answer
    CO-17121326-0 Profile Picture
    25 on at
    This has now been solved.
     
    The Array Variable has been removed from the workflow.
     
    Instead, in "Send an email (v2)", the attachment from "when a new email arrives (v3)" is directly referenced.
    This seems to work fine and the attachment now opens when the workflow has completed.
     
    The black box in the picture is the underlying code generated using the following selections:
    Insert Expression >> Fx >> Dynamic Content >> when a new email arrives (v3) >> Attachments Content
     
    At this stage, I am not sure how this would work for multiple attachments, but for this use case of a single attachment it works fine.
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard