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 / Error The file is corr...
Power Automate
Unanswered

Error The file is corrupt and cannot be opened > Using flow sending outlook email with attachment of a excel macro file from SharePoint/folder

(0) ShareShare
ReportReport
Posted on by 12

My requirement is - To send a macro file as outlook attachment with some dynamic data from SharePoint/folder/macro file.
I am reading a excel/macro file  from a SharePoint/folder/macro file then adding some rows.
After that I kept 10Sec delay.
Now I am reading the file metadata (using the path, and this I am getting from power app) and file content. And apend that to a array. Then I am sending email to someone.
File is sent successful to the outlook. But while opening that email attachments of this file. An error comes and it says "The file is corrupt and cannot be opened" .
But if I will open same file in SharePoint, it gets open perfectly and I can see newly added data by this flow.

Could you help me here to fix this.

 

BPP_P_0-1655383054914.png

error on the excel file --

BPP_P_1-1655383442958.png

after clicking yes, it says below

BPP_P_2-1655383512965.png

 

Categories:
I have the same question (0)
  • Verified answer
    BPP_P Profile Picture
    12 on at

    Now I have fixed this by removing  double quotes around the contentbytes inside the Append to Array variable in my above steps.

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard