Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 46

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?!?!

  • GeoffRen Profile Picture
    GeoffRen on at
    Re: Flow import failed : Input parameter 'ScriptParameters' validation failed in workflow operation

    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

     

  • KrAck Profile Picture
    KrAck 46 on at
    Re: Flow import failed : Input parameter 'ScriptParameters' validation failed in workflow operation

    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
    GeoffRen on at
    Re: Flow import failed : Input parameter 'ScriptParameters' validation failed in workflow operation

    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
    KrAck 46 on at
    Re: Flow import failed : Input parameter 'ScriptParameters' validation failed in workflow operation

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

     

    Thanks in advance!

  • KrAck Profile Picture
    KrAck 46 on at
    Re: Flow import failed : Input parameter 'ScriptParameters' validation failed in workflow operation

    @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});
    }
  • GeoffRen Profile Picture
    GeoffRen on at
    Re: Flow import failed : Input parameter 'ScriptParameters' validation failed in workflow operation

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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard

Featured topics