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 / Run script from ShareP...
Power Automate
Answered

Run script from SharePoint library failing on one flow but not other

(0) ShareShare
ReportReport
Posted on by 72
We have a flow setup to do the follow...
 
  1. Automated email comes through with an XLSX file attached, at different times of the day
  2. The previous XLSX is deleted from SharePoint
  3. The attachment is the saved in the same location with the same name
What needs to happen next is the Excel Sheet name needs changing as the report comes through with a different one depending on the date. This is so Power BI can see the data as it expects it to.
 
I creased an OSTS file that renames the sheet and does work.
 
I created a manual flow to test this script being ran against the same spreadsheet and it works as expected. 
 
When running on the production flow it fails 'The file format is not recognized. Please check that the selected workbook is valid
 
Why would the file type be working with a manual trigger but not a scheduled one? That is the only difference, everything else is the same.
 
Could the issue be with the action triggering a newly created file? I set a delay of 10 seconds but that did nothing.
 
Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    I don't see in your flow that you are doing any checks of the file type of the attachment. Have you checked the flow run to make sure that only an Excel file was attached, and no other file types are being processed?
  • twriggles24 Profile Picture
    72 on at
    The trigger is from a specific address (used for only this purpose) and if there's an attachment. This would only ever be the report we're expected. 
  • Verified answer
    twriggles24 Profile Picture
    72 on at
    Ok - not a clue what's happened but it's now decided to work...
     
    The fear of the Power Platform forum users has kicked it into life, thanks for look at it though :)

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard