![How to Export & Import Canvas Apps How to Export & Import Canvas Apps](https://i0.wp.com/365stack.in/wp-content/uploads/2021/12/Screenshot-350.png?fit=640%2C319&ssl=1?v=1639077310)
How to Export & Import Canvas Apps
Deploying artifacts from one environment to another is an integral part of application life cycle management. If the development is carried out in solutions (which is the recommended way) all the flows and apps can be exported and imported in one installment.
Previously we saw how to import flows individually, In this post we will see how to export and import the canvas app and its related connectors.
While importing the artifacts to the production environment, it is advisable to log in with “Service Account”. Because all the connections will be created as signed-in user permissions.
1.1 SharePoint customized forms – New
If the SharePoint list is customized it will create the app in the default environment (Upgrade), unlike normal canvas apps we cannot directly import to another environment because internally it will be mapped to the current list.
Navigate to the versions page and export the app
So after exporting it we need to make some changes in JSON, to map it to the destination list.
Check the file path in the below screenshot for the JSON file and what to change is pointed out.
Import the zip file in which the JSON is modified to the destination environment and make sure to change the “Resource name” while importing.
Open the destination list and select the customized form
Datasource is not connected and still pointing to the source list in the deployed app, So it should be changed to the destination list. Don’t replace the cards it will remove all the customizations made previously.
Replace all the source list data source names with the destination data source.
If there are more Single line of text columns then all the data cards will have the “Max length” property and it should be changed.
![](https://i0.wp.com/365stack.in/wp-content/uploads/2021/12/Screenshot-332-1024x659.png?resize=640%2C412&ssl=1)
Once all the changes are completed, publish the app.
1.2 SharePoint customized forms – Update
Now adding a workflow in the source list and it should be moved to the Destination list.
Export the package as “Create as New” or “Update” it does not matter.
![](https://i0.wp.com/365stack.in/wp-content/uploads/2021/12/Screenshot-338-1024x508.png?resize=640%2C318&ssl=1)
Delete the form in the destination list otherwise, it will throw an error like already an app exists there.
![](https://i0.wp.com/365stack.in/wp-content/uploads/2021/12/Screenshot-340-1024x485.png?resize=640%2C303&ssl=1)
Import the package, change the “resource name” and change the type as “Create as New”.
Once deployed, change the data source name, as we see the workflow is added and make sure the workflow is turned on.
2.1 Canvas App – New
In the canvas app, we don’t have to change the JSON because it is not dependant on any of the lists. Here the app can be exported across the environments. In the below example it is clearly shown the app is exported from “Dev” environment and imported to the “QA” environment.
Select the type as “Create as New” while exporting the app
Once the app is deployed open the app and remove the Source list datasource and change it with destination list data source.
![](https://i0.wp.com/365stack.in/wp-content/uploads/2021/12/Screenshot-346-1024x446.png?resize=640%2C279&ssl=1)
2.2 Canvas App – Update
In the source app, we added a workflow and exported the app setup as “Update”
While importing the app in the “QA” environment it will ask to select an app in which it has to be updated.
Once deployed replace the source datasource with the destination datasource.
Make sure to turn on the workflow, by default it will be turned off.
This will be suitable for the small app with one or two workflows. The recommended way is to use solutions for development as it makes the deployment easier. We have already published a post on how to deploy the flows.
Please post your queries in the comments section. Happy Building š