Working with Power Automate Child Flows: Error Encountered With Surprise Extra Parameters for a Child Flow

Power AutomateThis article is part of the Working with Power Automate Child Flows series and of the larger Working with Power Automate series I am writing on my experiences working with the Power Automate, which is part of the Power Platform from Microsoft. I also have a related series of articles on Power Automate with Microsoft Dynamics 365 BC.

I did some work creating a number of Power Automate flows for a colleague to use in a demo to a client. Part way through creating the flows, I started having problems with one of the flows which called a child flow; the parent failed every time it tried to call the child:

details of error

When I went into edit mode and looked at the Run a child flow action there were a lot more parameters than there should have been; the child flow was created to accept only a single parameter of the email address, but there was now a date and several location type parameters present:

Run a CHild Flow action with extra parameters

I did some research and found that the child flow itself had some issues and confirmed via the Microsoft Power Automate Community forums that there is a bug with Power Automate where extra parameters can just appear. A user suggested some steps to remedy the problem which involves exporting the flow and editing some files.

I had a go at doing this was was able to successfully resolve the problem.

What I did after downloading and extrating the files from the solution, was to edit the flow JSON file to remove two sections (shown in highlights below):

"inputs": {
	"schema": {
	  "type": "object",
	  "properties": {
		"email": {
		  "title": "invarEmail",
		  "type": "string",
		  "format": "email",
		  "x-ms-dynamically-added": true,
		  "description": "Please enter an e-mail address",
		  "x-ms-content-hint": "EMAIL"
		},
		"key-button-date": {
		  "title": "Date",
		  "type": "string",
		  "x-ms-dynamically-added": false
		},
		"location": {
		  "type": "object",
		  "properties": {
			"fullAddress": {
			  "title": "Full address",
			  "type": "string",
			  "x-ms-dynamically-added": false
			},
			"address": {
			  "type": "object",
			  "properties": {
				"countryOrRegion": {
				  "title": "Country/Region",
				  "type": "string",
				  "x-ms-dynamically-added": false
				},
				"city": {
				  "title": "City",
				  "type": "string",
				  "x-ms-dynamically-added": false
				},
				"state": {
				  "title": "State",
				  "type": "string",
				  "x-ms-dynamically-added": false
				},
				"street": {
				  "title": "Street",
				  "type": "string",
				  "x-ms-dynamically-added": false
				},
				"postalCode": {
				  "title": "Postal code",
				  "type": "string",
				  "x-ms-dynamically-added": false
				}
			  },
			  "required": [
				"countryOrRegion",
				"city",
				"state",
				"street",
				"postalCode"
			  ]
			},
			"coordinates": {
			  "type": "object",
			  "properties": {
				"latitude": {
				  "title": "Latitude",
				  "type": "number",
				  "x-ms-dynamically-added": false
				},
				"longitude": {
				  "title": "Longitude",
				  "type": "number",
				  "x-ms-dynamically-added": false
				}
			  },
			  "required": [
				"latitude",
				"longitude"
			  ]
			}
		  },
		  "required": [
			"fullAddress",
			"address",
			"coordinates"
		  ]
		}
	  },
	  "required": [
		"email",
		"key-button-date",
		"location"
	  ]
	},

The removed sections are the ones containing the extra fields which just appeared.

The next change was in the solution.xml file where I incremented the version number:

1.0.0.2

I then added the two changed files back to the solution zip file (making sure to change the version number in the name of the zip), which I then uploaded to the Power Automate portal; the flow which was erroring previously was no longer erroring.

One thing to watch out for is to avoid running any history instance of the flow which was run when the the flow had the problem, as this can re-corrupt the file.

Unfortunately, this looks to be a long standing problem although I am not sure how often it is going to cocur and if it can also happen with a flow in a managed solution.

Working with Power Automate

Working with Power Automate
What is Power Automate?
What Type of Flow Are Available?
What Type of Cloud Flows Are Available?
Power Automate with Business Central
Working with Power Automate Solutions: What Are Solutions?
Working with Power Automate Solutions: What Types of Solution Are There?
Working with Power Automate Solutions: What is a Solution Publisher?
Working with Power Automate Solutions: Create a Solution Publisher
Working with Power Automate Solutions: Create a Solution
Working with Power Automate Solutions: Publish a Solution
Working with Power Automate Solutions: Version Numbering for Solutions
Working with Power Automate Solutions: Exporting An Unmanaged Solution
Working with Power Automate Solutions: Importing An Unmanaged Solution
Working with Power Automate Solutions: Exporting A Managed Solution
Working with Power Automate Solutions: Importing A Managed Solution
Working with Power Automate Solutions: Change the Managed Properties of a Solution Component
Create a Visio Diagram of a Flow
What Are Environment Variables and Why Should They be Used?
Create an Environment Variable
Create a New Cloud Flow From a Template
Managing Large Flows
What is a Scope?
Example of How to Use a Scope
Best Practice For Using Scopes
Working with Power Automate Child Flows: What are Child Flows?
Working with Power Automate Child Flows: Create a Child Flow
Working with Power Automate Child Flows: Change Run Only Users For Child Flow
Working with Power Automate Child Flows: Add a Child Flow To a Parent Flow
Working with Power Automate Child Flows: Test the Parent/Child Flow Examples
Working with Power Automate Child Flows: Error Encountered Saving a Flow Which Calls a Child Flow
Working with Power Automate Child Flows: Error Encountered With Surprise Extra Parameters for a Child Flow
Calculate 30 Days Ago

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Leave a Reply

Your email address will not be published. Required fields are marked *