Packaging and deployment are the final and the most important steps of any application development. Export and Import facility in MS Flow (Microsoft Flow), provides the way to deploy your MS Flow from one environment to the other environment just by doing some simple steps.
In this article, first, we will go through the instructions on how to Export a Flow from one Tenant. Then we will perform some manual steps to Import a Flow in another Tenant.
We will also go through some guidance and limitations around importing and exporting an MS Flow
Export a Flow
- Go to you flows >> Locate your MS flow
- Click on ellipsis >> Export >> Package(.zip)
- On the next page which is Export Package screen, enter the name of the package and description if you want.
- Scroll down, you will see another section for Review Package Content. Either click on Update from IMPORT SETUP or click on Settings icon from ACTION, both will open the same page called Import Setup.
- You need to carefully select the option on the Import setup screen. It is self-explanatory, if you are deploying this page into the other environment for the first time then you should select Create as new else if you are updating an existing one then select Update (default).
- Scroll down, if you have used any specific resource in your MS Flow, then you will see those resources over here on Related resources section. As shown in the screenshot, you can keep the IMPORT SETUP as Select during import.
- Click on Export. A zip file will be exported
Import a Flow
- Go to the environment where you want to import/setup this flow.
- Click on Import
- It will open the Import Package screen. Click on the Upload button and add .zip package exported in the previous section. Click on Import.
- On the next screen, you will see the package information that you had entered at the time of exporting the package. It will show, Package Created By, Name of the package, Environment, and Description of the package.
- Scroll down, you will see the Review Package Content section. You can see in the IMPORT SETUP, it is marked as Create as new. While exporting the flow we had selected Create as New so that’s why it is showing by-default that option. You can click on it and change it to Update if you are updating the flow.
- Scroll down, you will see all the resources used in the flow. If your related resources are not matching the destination environment resources, then it will give an error like below (Red Icon in the Name column).
- To resolve the Related Resources issue, click on Select during import from the IMPORT SETUP column.
- For example, we will show you how to resolve the Content Conversion resource from the above screenshot.
- Click on Select during import from IMPORT SETUP.
- On Manage your connections page, Click on New connection or Create a connection.
- On the screen, you can click on Create new >> Search the connection and add it.
- After adding the resource, click on the Refresh list. You should see the source.
- Click on the resource and Save it.
- You need to repeat this process for all the resources which are giving errors.
- After adding all the resources, when the Import process of MS Flow completes, you will see the below message.
- You can click on Open flow to check your imported flow.
Notes:
- Make sure whatever List, Columns, Views or any other SharePoint objects that you have used in your flow, is also created in the destination environment.
- Right now, there is NO API like CSOM or PowerShell available that you can use to Move or Deploy MS Flow from one environment to another environment. For that, you will have to follow the manual steps only.
The issue you may encounter:
The user ‘User Id’ does not have a service plan adequate for the non-Standard connection:
Root Cause:
- Go to https://tenantprefix-admin.sharepoint.com (SharePoint Admin Center) and check your license.
- The plan Microsoft Flow Plan 2 should be assigned to the user.
- If you are tenant admin, you can directly go to the URL - https://admin.flow.microsoft.com/tenant/userLicenses.
- You will get the details of all the users and their assigned plans. You can check the MS Flow Pricing also.
- Please let us know in the comment section below if you are facing any issue while deploying MS Flow from one Tenant to another Tenant.