Forum Discussion
eahbxecrfash3q
Jan 24, 2025Brass Contributor
File created from SharePoint list via Power Automate cannot be opened
I have a Power Automate flow that is supposed run once a day at 7:45AM EST. Then Get items from a SharePoint list where the filter query is: ReminderOne column is less than or equal to the date when the flow was triggered and field_4 (Date and Time) is null. Next it should get the following columns and values from Get items: Site (Single line of text), PageURL (Single line of text), the email from Requestor (Person or Group with multi-select disabled), the emails from SiteOwners (Person or Group with multi-select enabled), and field_3 (Date and Time). From the values of those columns it should create an Excel file in https://xxx.com/teams/xxx/Shared%20Documents/xxx/xxx/. Lastly it should take that Excel file and attach it to an email- not as a link but as a file to download.
The flow runs successfully, however, when I try to open the file in the folder its in or in the email attachment, I get an error that the file can't be opened.
May check on below at first place:
- Check the File Content: Ensure the content of the file is correct and in the expected format before sending it. You can do this by adding a step in your flow to save the file temporarily to another location, and manually open it to check.
- File Type Compatibility: Double-check that the file type you're saving and sending is compatible with Excel. Make sure the file is being saved as .xlsx.
- Excel Template: Use an Excel template stored in SharePoint to create the file. This ensures that the structure and formatting of the file are set properly.
- Content Conversion: Ensure that the data you're writing to the Excel file is properly formatted. Sometimes, data types or special characters can cause issues when opening the file.
- Access Permissions: Verify that the file permissions are set correctly. If the file is stored in a location with restrictive permissions, it might affect your ability to open it even if the flow runs successfully.
- Power Automate Configuration: Re-check the Power Automate configuration to ensure each step is configured correctly, and that necessary connectors and actions are in place.