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 / Flow import failed : I...
Power Automate
Unanswered

Flow import failed : Input parameter 'ScriptParameters' validation failed in workflow operation

(0) ShareShare
ReportReport
Posted on by 56

This is the error I get:

 

Error message.png

 

When trying to import a flow that contains an action to run a script in an Excel workbook:

 

Power Automate Action.png

 

But no idea where I can find the property  'ScriptParameters' and how to set it to one if its defined enum values?!?!

Categories:
I have the same question (0)
  • GeoffRen Profile Picture
    Microsoft Employee on at

    Could you provide the script? It seems there's some parameters in the script that aren't playing nicely.

  • KrAck Profile Picture
    56 on at

    @GeoffRen : the script in the Code Editor in the Excel is this rather simple script:

     

    function main(workbook: ExcelScript.Workbook) {
      let users = workbook.getWorksheet("Users");
      // Replace "GetEmployeeData" with "EmployeeData" on users
      users.replaceAll("GetEmployeeData""EmployeeData", {completeMatch: false, matchCase: false});
    }
  • KrAck Profile Picture
    56 on at

    @GeoffRen where you already able in the meantime to take a closer look to this?

     

    Thanks in advance!

  • GeoffRen Profile Picture
    Microsoft Employee on at

    Sorry for the late update! The script seems fine. There are known issues with importing Flows with the Run Script action which will hopefully be ironed out in the future. Though usually the bug is a permissions error.

     

    Your bug seems like the import process had the null parameter type get translated incorrectly to the UI. These bugs are usually resolved by just manually recreating the Run Script action. Are you able to do that? 

  • KrAck Profile Picture
    56 on at

    Hey @GeoffRen ,

     

    >> These bugs are usually resolved by just manually recreating the Run Script action. 

     

    Yeah, but to be able to do that, you first need to be able to import the flow, and that's just the process that's complaining about the ScriptParameters.

     

    The exported flow contains an action to run a script in Excel, and when I try to import that flow, it gives that error.

     

  • GeoffRen Profile Picture
    Microsoft Employee on at

    In the original Flow, if you click on the three dots icon for more options and then Peek code, does it contain something like "ScriptParameters": {}? If so, you should recreate the Run Script action in the original Flow and then export it again. Peek code should show that "ScriptParameters": {} no longer exists.

    GeoffRen_0-1658332178471.png

     

     

    If you don't have access to the Flow or that doesn't work, you can modify the exported zip file. From the zip, open Microsoft.Flow/flows/{some id}/definition.json. There should be a section there called "Run_script". In that section, delete the "ScriptParameters": {} data. Also delete the preceding comma to ensure the file format is still valid. I've highlighted what should be deleted from a similar file I created. You can copy and paste the file contents into https://jsonformatter.org/ to make the file more readable.

    GeoffRen_1-1658332337781.png

     

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard