How to Fix Power Automate Sending Corrupted Excel Attachments
Question details
The user needs to fix a Power Automate flow that successfully runs but generates and sends a corrupted Excel (.xlsx) attachment that cannot be opened.

- Product
- Microsoft Power Automate / Excel
- Device & OS
- not provided
- Scenario
- Automating email attachments containing Excel workbooks using a Microsoft Power Automate flow.
- Observed behavior
- The automation flow completes without errors, but the recipient receives an invalid or corrupted .xlsx file that fails to open, whereas a manually attached copy of the same file opens perfectly.
Verify that the source Excel file located in your SharePoint or OneDrive directory opens correctly before the Power Automate flow attempts to process it.
Pass Correct Binary Content and File Extension
The most common reason for corrupted flow attachments is mapping incorrect dynamic content or forgetting the .xlsx extension in the email action.
Power Automate handles files as binary objects. If the flow passes file metadata or plain text into the attachment content field instead of the actual file binary, the resulting file will be structurally broken.
Open your flow in Power Automate, click 'Edit', and expand the 'Send an email (V2)' or relevant email action.
In the 'Attachments Name' field, ensure the file name explicitly ends with the '.xlsx' extension (e.g., 'Report.xlsx').
Click into the 'Attachments Content' field and select the 'File Content' dynamic output from the preceding 'Get file content' action. Do not select 'Body' or 'Id'.
Ensure you are not using base64ToString() or other plain-text conversion expressions on the file content unless explicitly required by a custom API.

Add a Delay Action Before Fetching the File
Use this solution if your flow creates or updates the Excel workbook immediately before attaching it to the email.
Open and Edit Excel Files with WPS Office
Dealing with corrupted file formats or complex Microsoft flows can be frustrating. Try WPS Office, a free, lightweight, and highly compatible alternative to Microsoft Office. It seamlessly opens .xlsx, .doc, and .ppt files without requiring heavy subscriptions.
- 1. Download WPS Office: Visit the official WPS Office website to download the free, lightweight installer for your operating system.
- 2. Install the Software: Run the setup file and follow the on-screen instructions to complete the fast installation process.
- 3. Open Your Spreadsheets: Right-click any .xlsx file, select 'Open with', and choose WPS Office to view and edit your data instantly.

Frequently Asked Questions
Why does my manually attached Excel file work while the Power Automate one is corrupted?
Manual attachments bypass the flow process entirely, relying on your operating system to handle the file correctly. In Power Automate, if the flow uses the wrong file identifier or converts the binary data incorrectly during automation, the resulting output will be corrupted, even if the original source file is perfectly fine.
What dynamic content should I use for the Excel attachment in Power Automate?
You must use the 'File Content' dynamic output generated from the 'Get file content' or 'Get file content using path' actions. Using 'Body', 'Metadata', or just the file path will result in an unreadable file structure.
Can base64 encoding cause Excel file corruption in Power Automate?
Yes. If you manually convert the Excel binary content using base64 expressions and the receiving email action expects raw binary data, the file structure breaks. Always pass the raw binary object directly unless a specific custom connector or API requires base64 string encoding.
How do I know if the source Excel file is actually corrupted before the flow runs?
Try downloading the file directly from the SharePoint or OneDrive directory where the flow retrieves it. If it opens successfully in Excel or WPS Office on your desktop, the source file is fine, meaning the corruption is occurring entirely within the Power Automate flow setup.




