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
Suggested Answer

Run script from SharePoint library failed

(0) ShareShare
ReportReport
Posted on by 8
I have a flow that has been running smoothly for a couple of months without any issues. However, today it did not work, and I encountered an error when using the 'Run script from SharePoint library' function. The error message is as follows:

 
{
  "error": {
    "code"502,
    "source""flow-apim-europe-001-westeurope-01.azure-apim.net",
    "clientRequestId""2782005a-2bd3-43ad-b0bf-6cf185b84a1c",
    "message""BadGateway",
    "innerError": {
      "message""We were unable to run the script. Please try again.\r\nclientRequestId: 2782005a-2bd3-43ad-b0bf-6cf185b84a1c",
      "logs"null
    }
  }
}

The script is in the same folder as new file that I am creating.



I would be very grateful for any assistance you can provide!
If you need more information about my flow, feel free to ask.
Thank you!
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,392 Super User 2025 Season 2 on at
    Hi,
     
    If you go to where the file is, and manually execute it (please try it not just say it works), does it work?
     
    As long as there are no script errors, nobody changed permissions and it's still in the same place it was before, as in nobody moved it,
    no one changed it, (look at the scripts last modified date), then we also have to review what actions it is doing
     
    Since its in SharePoint, I am going to assume you have Versioning on, so I would look at who did what, if anything to the script.
     
    Its very possible that an Action inside the script has now changed and or needs a not required before privilege.
     
    I would definitely start the manual test first, then review the history of the file to see who changed what, AND to validate that the files it will impact
    or be used and actions aren't something a problem now.

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard