Currently I have an error when exporting a flow from PowerAutomate. The error-message is: Unsupported creation type 'Existing, New, Update'. If I compare the manifest file of the exported flow with one that was exported manually, the suggestedCreationType parameter is missing in the manifest file.
After I inserted the parameter ("suggestedCreationType":"Update",) manually, the import works.
I have exported the Flow with following Command:
m365 flow export -e Default-XXX -i XXX -s Default-XXX
PowerShell: 5.1.18362.752
CLI: 3.1.0
@joshua-probst
I can confirm that behavior.
flow export --environment Default-XXX --id XXX --format zip --path './FlowName.zip' --packageDisplayName 'packageDisplayName' --packageDescription 'packageDescription' --packageCreatedBy '[email protected]' --packageSourceEnvironment Default-XXX
One thing to add:
The extract from the manifest.json done by means of m365 flow export:
{
"schema": "1.0",
"details": {
"..."
},
"resources": {
"XXX": {
"type": "Microsoft.Flow/flows",
"creationType": "Existing, New, Update",
"details": {
"displayName": "displayName"
},
"configurableBy": "User",
"hierarchy": "Root",
"dependsOn": [
"...",
]
},
"..."
}
Neither the "hierarchy": "Root" nor the dependencies "hierarchy": "Child" contain a parameter for suggestedCreationType.
The manual export through the PowerAutomate web UI contains depending on your choice "suggestedCreationType": "New" or "suggestedCreationType": "Update"" for "hierarchy": "Root" and "suggestedCreationType": "Existing" in the dependencies "hierarchy": "Child"
Question my side:
What is the difference between suggestedCreationType and creationType, or else: Which parameter needs to be adjusted in order to enforce a creation as New flow instead update an existing flow?
Same flow exported manually through the PowerAutomate web UI would include an parameter "suggestedCreationType"
{
"schema": "1.0",
"details": {
"..."
},
"resources": {
"XXX": {
"type": "Microsoft.Flow/flows",
"suggestedCreationType": "New",
"creationType": "Existing, New, Update",
"details": {
"displayName": "displayName"
},
"configurableBy": "User",
"hierarchy": "Root",
"dependsOn": [
"...",
]
},
"..."
}
Thank you for raising this @joshua-probst and thank you @Markus-Hanisch for the extra detail, apologies for the trouble.
I've looked into this issue and have been able to reproduce the error when importing a Flow exported using the flow export command.
The root cause seems to be that we are not passing the suggestedCreationType in the body of the request to the exportPackage endpoint.
What is the difference between suggestedCreationType and creationType, or else: Which parameter needs to be adjusted in order to enforce a creation as New flow instead update an existing flow?
creationType appears to define the possible options that can be used as the suggestedCreationType for the resource, this property value is set using the Import Setup options in the Export screen in the Power Automate UI.
When exporting a Flow, when you click the Package (.zip) option in the Export menu a call is made to the listPackageResources endpoint which returns the resources for the Flow, which are sent in the post request to the exportPackage endpoint when exported but with an additional property suggestedCreationType that is defined by the Import Setup options chosen in the UI.


Unfortunately in the CLI implementation we simply pass the resources from the listPackageResources response directly to the exportPackage endpoint without adding the suggestedCreationType properties to each resources, this is what is causing the error.
I have implemented a quick code fix and can confirm that this fixes the bug you have highlighted by adding the below code block to update the resources objects accordingly, which results in the generated manifest.json containing the required properties for a successful import.
const resourceKeys = Object.keys(res.resources);
resourceKeys.forEach((resourceKey) => {
if (res.resources[resourceKey].type === 'Microsoft.Flow/flows') {
res.resources[resourceKey].suggestedCreationType = 'Update';
} else {
res.resources[resourceKey].suggestedCreationType = 'Existing';
}
});
Although we set the suggestedCreationType for the Flow to Update this value can be overwritten at import time by changing the Import Setup type to New in the UI to create a New flow.
I will look to write the tests and submit the PR tomorrow evening, all being well we should have this released by the weekend as a beta version for you to test.
This issue has been fixed in the latest preview release. Thanks again for reporting @joshua-probst 馃憦
Most helpful comment
This issue has been fixed in the latest preview release. Thanks again for reporting @joshua-probst 馃憦