Skip to main content

Notifications

Power Automate - Building Flows
Answered

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

Posted on 12 Dec 2024 12:26:56 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.
 
  • Verified answer
    twriggles24 Profile Picture
    twriggles24 72 on 12 Dec 2024 at 13:03:26
    Run script from SharePoint library failing on one flow but not other
    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 :)
  • twriggles24 Profile Picture
    twriggles24 72 on 12 Dec 2024 at 12:51:50
    Run script from SharePoint library failing on one flow but not other
    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. 
  • David_MA Profile Picture
    David_MA 7,582 on 12 Dec 2024 at 12:46:02
    Run script from SharePoint library failing on one flow but not other
    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?

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard