Power Apps Export and Import Utility and ModelDrivenFormIntegration

Felix Davy Nupa
Capgemini Microsoft Blog
5 min readMar 26, 2020
Credit: James Oleinik

Background

I worked on a project where I was requested to build a Canvas App that trigger Flow on the click of a button. The Flow uses the custom connector to authenticate and interact with an external API, so I had to combine the Flow with the custom connector in order to implement the solution.

ModelDrivenFormIntegration Limitations

The Canvas Apps needs to be embedded into the model driven App, so I used ModelDrivenFormIntegration as the interface to collect data from the model driven app to the Canvas App. At one point, I had a few challenges using the ModelDrivenFormIntegration in getting the data from the model driven app to the Canvas App, as some of the data wasn’t synchronising, I was just getting part of the data from the model driven app, so I remedied this limitation by using Flow as action from button click to be able to pull all the data from the mode driven app.

Export and Import Package to move Canvas App, Flows from one environment to another one

Before exporting any of these components, make sure to take the most recent published version — not the editing version but the published version.

Other limitations were encountered when deploying the Canvas App, Flow and custom connectors from one environment to another.

As an example, Flows can’t work with custom connectors on the environment different from the one that it was created in originally. To remedy this, I created the custom connector from scratch on the target environment.

Another limitation is Canvas Apps that are exported and imported as managed or un-managed solutions cannot trigger Flow’s in the target environment, or if editing the Canvas App in the target environment from the Power Platform studio, then clicking on Action menu, Flow’s were not appearing in the Power Automate list.

Use of Export and Import package to move Flow’s and Canvas Apps from one environment to another appears to be the effective and efficient solution, but it’s important to follow these steps for the import to succeed in the target environment.

Use of Export Package to export Flow’s

To be able to see the Export utility feature, make sure you are on the Power Automate screen, see Screenshot 1 below

As you can see on the screenshot 2, we need to provide a name for the exported file and select IMPORT SETUP to update or Create during the export, so if we have previously exported the Flow and imported it in the target environment, then we have to set the IMPORT SETUP to update otherwise, it will be create.

Use of export Package to export Canvas Apps

As you can see in the screenshot 3, when exporting the Canvas App, you’ll be presented with some choices to make before the export, especially when the Canvas App has some dependencies. In my case, I had custom connector and Flow’s. I also needed to set up the IMPORT SETUP to Update or Create depending if I had previously imported it in the target environment.

Bear in mind that the custom connector has to be selected during the import as it should be existent in the target environment before the import, if not, then need to be created before the import.

Screenshot 1
Screenshot 2
Screenshot 3

Use of Import utility package to move Flow to the target environment

To be able to see the Import utility feature, make sure you are on the Power Automate screen, see Screenshot 4 below.

As per Screenshot 5, During the import , I need to set up the IMPORT SETUP to the Create or Update depending if it’s the first time I am importing it in the target environment, so set it to Create if it’s the very first import otherwise to Update, and the common Data Service Connection has to be existent in the target environment and has to be selected during the import.

Screenshot 4
Screenshot 5

Use of Import utility package to move Canvas App to the target environment

By clicking on Apps on the left Navigation pane, I was presented with the screen as shown on Screenshot 6, then I just clicked on Import.

When importing Canvas App that trigger Flow on the click of a button, we need to make sure to import those Flow’s in the target environment before importing the Canvas App, as during the import, we’ll be asked to select the Flow.

We need to set up the IMPORT SETUP to the Create or Update depending if it’s the first time we are importing it in the target environment. Set it to Create if it’s the very first import otherwise to Update, and the common Data Service Connection has to be existent in the target environment and has to be selected during the import.

Screenshot 6
Screenshot 7

Conclusion

It has been good for me to experience these challenges. At first I tried to use solutions to move these components from one environment to another but, after many attempts I found the most effective and efficient way to do it was as described above. I hope anyone who faces the same challenges will find this useful. Enjoy!

Keen to work more with the Power Platform? Take a look at our open roles here and join the Microsoft team.

--

--