Dynamics 365 Migrating Power Automate Flows
If you have multiple Dynamics 365 environments e.g. Dev, Test, UAT and Production then you may need to migrate Power Automate Flows.
There are two ways to import Power Automate Flows into an environment; using a Package (Package.zip) or using a Solution.
PACKAGE (PACKAGE.ZIP)
You can export and import your Power Automate Flows as a Package individually through https://flow.microsoft.com .
The Package is the more complicated way to export and import Flows, however this gives you greater control.
To export your Flow as a Package, select the Flow and click “Export”
Then select “Package (.zip)”
In the Package details you can configure the Flow’s “IMPORT SETUP”.
You can choose whether the Flow is being created as new or updating an existing Flow. This will default to “Update”. If the Power Automate Flow doesn’t exist in the Dynamics 365 instance you’re importing to, then you can select “Create as new” before exporting. Note that if the Import Setup is “Update” you can still change it to “Create as new” on Import, however it will take a few extra steps.
Reminder: make sure you have the correct environment selected when you are exporting and import the Packages.
Upon Importing the package, select the Import under My flows
If this is an Update Package it will display the existing Flow(s), select the Flow you want to update and click Save.
Notice the difference coloured icons? Grey is for a selection to be made, red invalid config and green is valid config.
Once the package has been uploaded it will display the Package details. In the Package Content the “Create as new” will have a green tick. This is because the Import Setup is “Create” and no mapping to an existing Flow is required.
For the Common Data Service (CDS) Connection, if there is an existing CDS Connection select that, otherwise create a new CDS Connection.
SOLUTIONS
Using Solutions is a great way to migrate multiple Power Automate Flows in an import. This is also a great way to group all your Dynamics 365 changes into a single Solution.
However currently there are a few caveats:
- When importing Flows, you can’t set a connection or import with a connection, therefore the Flow(s) will have no connection and require configuration.
- “Canvas app triggered Flows are not available in solutions.”
- “Button triggered Flows are not available in solutions.”
For further solution limitations you can view: https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/use-solution-explorer#known-limitations
You can add the Power Automate Flow to the solution through https://flow.microsoft.com or https://make.powerapps.com under the Solutions area.
Once the Solution with the Flow(s) has been Imported, you will need to individually open each Flow and modify the Connections.
When editing the Flow, you can see each CDS step has a warning “Invalid connection”.
Click on the step and select the existing connection or create a new one.
The warnings will be removed, then you can save and turn on the Flow.
This process can be more time consuming than importing each Flow individually using a Package.
SUMMARY
Pros | Cons | |
Package | · Able to define how imported · Configurable on Import. | · Each Package can only import one Flow · Requires configuration on export and import |
Solution | · Integrated with Dynamics 365 Solutions · Able to export and import multiple Flows at once. · Grouping of other changes with the Flow for a release | · Can’t import on-demand Flows (canvas triggered or button) · Imported Flow(s) won’t have a configured connection and will require this to be configured individually afterwards. |
Currently I would recommend using Packages to migrate Power Automate Flows, while Solutions cannot handle connections
No comments:
Post a Comment