February 05, 2019

How to Export and Import Team Flows

585 Views
How to Export and Import Team Flows

Introduction

I presume your interest in reading this blog is because you’ve faced a roadblock in reusing your workflow across different tenants, unless you simply like reading my blogs 😊.

While many would lose interest in reading further thinking they already have or know how to remove the roadblock, there’s an interesting revelation that I stumbled across while trying to reuse a meticulously created Flow. Jump to the next section to read how the story unfolds.

Where lies the Issue?

I presume that the intent to import is on a destination list/library that has a similar structure as the list/library on the source environment, from where the flow was exported. However, if there is no reference (action/condition) on any field of the list/library, the source and destination list/library could be of different structure, else, at least the referenced field types should match on both source and destination.

The one challenge that I faced so far was changing connections to users/groups on the new SharePoint Online tenant.

While some may argue that there never existed one, let me elaborate – if you are trying to import Flows into a pristine environment that never contained a Flow, the default connection doesn't by itself use the logged in account to connect.

Needless to say, even the simplest of Flows require a minimum of one SharePoint Connection (user/group credentials to access SharePoint resource) after it’s imported. This might not be a hold back immediately. But as you use more actions in your Flow to fetch usernames, or trying to set up automated emails, you’d need multiple types of connections, which might impede the Flow import process.

Example

My flow sent mail, so an Outlook connection in addition to SharePoint connection was needed.

Another issue, though a trivial one could be - users wanting to export Team Flows and expect to see the import also as a Team Flow. I consider this as insignificant because any Flow that shows under My Flows can at any point in time be transformed to move under Team Flows, and vice versa.

Let’s walk through the Process

The stepwise process is enumerated below.

Exporting the Flow

Export of any type of Flow is simple and similar. Select the flow from the relevant list of Flows (My flows or Team flows), right click, Export > Package (.zip).

How to Export and Import Microsoft Teams Flows

Give any name to the zip file and save it to your local drive.

Importing the Flow

Open Flows on the destination SharePoint Online tenant, and Import the saved zip file. Now use the following steps demonstrated in the images below.

How to Export and Import Microsoft Teams Flows

How to Export and Import Microsoft Teams Flows

Setting up connections

Unless this import is meant to update an existing flow, select Create as New instead of Update as the Import Setup for the flow to avoid updating an existing flow.

How to Export and Import Microsoft Teams Flows

The connections listed under Resource Type are just a few connection types that my flow uses. The roadblock during the import was to point user connections in the Import Setup column of the Related Resources section.

As in the screenshot below the list never refreshed to show me connection options except for SharePoint Connection.

How to Export and Import Microsoft Teams Flows

Straight to the Fix!

Before importing the flow, create (not import) new sample/test flows in your destination tenant to use connections that you are attempting to configure in the imported flow. Once these connections are successful, you should be able to see connection options during configuration of the imported flow, as in the image below.

How to Export and Import Microsoft Teams Flows

Once you’ve set up the Resource Type, the Import button gets activated to import the flow.

After the import process has successfully ended, you’ll notice that regardless of whether you want to import a Team Flow or single user My Flow, the imported flow always shows under My Flows.

You can now associate the appropriate list/library on the destination environment. 

How to Export and Import Microsoft Teams Flows

You know the rest – just share the flow with the intended users to transform it to a Team Flow 😊

How to Export and Import Microsoft Teams Flows

I haven’t come across a better workaround than this, so if you readers want to try out this flow, do drop in your comments letting me know how you have improved it!

Leave a Reply

Your email address will not be published. Required fields are marked *