Hi Power Automate community,
I have an issue with the Create file (SharePoint) connecter within my Power Automate workflow. Currently, there is a production instance of a power automate workflow that works successfully. The automated cloud workflow is triggered using the "When a new email arrives in a shared mailbox (V2)" which looks for a specific Subject Filter, and emails with Attachments, and includes the attachments. The workflow then initializes several variables from the email itself to be used later on for adding variables to file names, etc. The production workflow successfully creates Excel files in the designated SharePoint location (and can be opened).
I want to update the workflow to validate the headers on the excel files being attached to the emails. I created a duplicate workflow and adjusted only the Subject Filter in the trigger, and the folder in the create file configuration. However, when testing this development workflow, the create file tool is succeeding on the surface, but the Excel file in the SharePoint is corrupted. When I try to open the file it has the following error:
"Couldn't open the workbook: This workbook couldn't be opened because the file format may not be matching with the file extension."
Troubleshooting:
- I've ensured the attachment is truly an excel file (.xlsx format) and have already tried other formats (.xls, .csv, txt) but none of these change.
- I've ensured this excel file is the only attachment on the email
- There are no formatted tables or macros on this excel file. It is just a very simple table with headers in the first row.
- The Create file parameter "File Content" utilizes the "When a new email arrives in a shared mailbox (V2)" tool's dynamic "Attachments Content" variable.
I've reviewed this workflow with other members on my team who have experience using Power Automate and we cannot seem to figure out why this tool creates files successfully in one workflow, but only creates corrupted files in another workflow. Please let me know if I can provide any additional information. Thank you in advance.