Showing results for 
Search instead for 
Did you mean: 

Microsoft Flow input parameters maximum length -1 error

We are facing an error on maximum length '-1' limitation when we a SQL Stored Procedure in triggered from PowerApps button click in Microsoft flow.
Below is the error
"The 'inputs.parameters' of workflow operation 'Execute_stored_procedure_(V2)' of type 'OpenApiConnection' is not valid. Error details: The API operation 'ExecuteProcedure_V2' requires the property 'parameters/Paramenter1Name' to be a string of maximum length '-1' but is of length '14'.
Has anyone faced a similar issue? Our code is working fine before, but we are facing this error since yesterday(March 23rd)

Hi @mike528,


Thanks for reply.

I tried with your solution by replacing my json field column in procedure with nvarchar(MAX) to nvarchar(4000) and it worked, but MAX is required for this field, this is just work around, it cant be solution.

I need to raise ticket for that as well.

Also how to build a customer connector that will write to SQL DB correctly, please provide any links if you have.



I had exactly the same issue. My SP was working fine, until I had to make a change to my flow (I needed to edit the json response), and it suddenly stopped working.  Changing the parameter in SQL from nvarchar(MAX) to nvarchar(4000) worked and fixed the issue.  I will have to watch for when Microsoft correct it so that I can revert back to nvarchar(MAX) on the SPside.


Thanks to all in this link for the solution guidance.




Thanks @Andre 


I was trying to pass very long XML string from Flow to a Stored Procedure, and was getting the same error using the XML data type on the Stored Proc side. So thanks to your post, I firstly changed my flow from "Execute a Stored Proc v2" to "Execute a SQL Query v2", and then I also changed my SQL stored proc parameter type from XML to varchar(max), and it worked. 





Resolver II
Resolver II



I am very happy to report this bug has been fixed by Microsoft! After nearly 2 1/2 months of back and forth, varchar(max) are not supported again. The MS support team was very helpful in getting this escalated to the engineering team to finally fix this!




Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,371)