How to Export a Flow and Import Into a Different Environment Step by Step

If you have been creating workflows in SharePoint Designer, how many times have you had to recreate the same or very similar workflow? Now when using Microsoft Flow you can export the workflow you want to reuse and then import it into the environment where you need it very easily. Admittedly I was skeptical of how this would work when it was announced, but upon testing it have found it to work simply and seamlessly.

I was able to take a few different Flows that are using different connectors and import them into one of my other test Office 365 tenants. If the environment you are importing the Flow into already has the connectors you need you will be able to just select them. If it doesn’t have them you will be prompted to create them during the import process. If you do not have an account for one of the services that the Flow connects with in the environment you are importing it into you will not be successful.

One of the Flows I exported/imported was a Flow that runs on a recurrence every day then updates SharePoint task items in a list when they become overdue.

Here are the steps of the workflow:

recurrence apply to each flow

utcnow flow condition step

Export the Flow into a .zip file from either right My Flows or from the Flow summary page of the Flow you want to export. From My Flows click the ellipsis to the right of it and select Export.

Export

Select Package (.zip) and you will be taken to an Export Package page where you will name the file and choose whether this will be created as new or an update of an existing Flow.

export Flow package page

If the Flow is new to the environment you are importing it into, select Update under Import Setup and then choose Create as new then Save.import setup flow.PNG

Click Export and save the .zip file. Within the .zip file are several .json files, but you will not even need to open the .zip package to do the import.

Log into the Flow environment that you want to import the Flow into.

On the My Flows page click Import in the top right corner.

import flow

Browse for the .zip file of the Flow by clicking Upload. import package flow

You will be brought to the Import Package page. You should see a green check mark next to the Flow Name. Under Related Resources you will get a red exclamation point next to the connectors that the Flow uses. If you have the same user account connection in both environments, you will see a black “X” meaning it is ready to go.

import flow package office 365

Click on the wrench to the right of the SharePoint Connection. If the environment has an existing SharePoint Flow connection you will be able to select it and click Save. In this case we need to create a new connection.

import setup flow

Click on Create New  and you will be brought to the Manage your connections page in a new window. Click on Create connection.

create connection

You will be presented all of the available services to connect with Flow. Select SharePoint or the service you need then click Create Connection. You will be prompted to log in to an account for the service. After successful login you will see the new connection in My connections. sharepoint connection flow

Navigate back to the Import Package page that you should still have open in your browser. You will see your new connection, select it and press Save.

new connection flow import

You will need to repeat the Create Connection steps for every service used in the Flow. You will see a black “X” now next to the SharePoint Connection meaning success.

sharepoint connection

Press the Import button once you have a black “X” next to all of your Related Resources. Click Import and if you are successful they will turn into green check marks.

success with flow import.PNG

Now open the Flow and run it to make sure everything is working as expected! You can also now add additional steps if needed and update the Flow.

There are some known limitations with the export/import functionality. Click the link below to get the listing and additional information from Microsoft.  

Export and import your flows across environments with packaging

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s