Dynamics 365 Migrating Power Automate Flows

Nick Chin, 11 March 2020


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”

image

Then select “Package (.zip)”

clip_image003

In the Package details you can configure the Flow’s “IMPORT SETUP”.

image

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.

image

Reminder: make sure you have the correct environment selected when you are exporting and import the Packages.

image

Upon Importing the package, select the Import under My flows

image

If this is an Update Package it will display the existing Flow(s), select the Flow you want to update and click Save.

image

Notice the difference coloured icons? Grey is for a selection to be made, red invalid config and green is valid config.

image

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.

image

image

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.

image

Once the Solution with the Flow(s) has been Imported, you will need to individually open each Flow and modify the Connections.

image

When editing the Flow, you can see each CDS step has a warning “Invalid connection”.

image

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.

image

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.