-->

Celebrate the Success Stories of Knowledge Management - 2022 KMWorld Awards

The Power of MS PowerAutomate

Produced by Steve Nathans-Kelly

At KMWorld Connect 2021, Heather Farrell, Pfizer Business Systems data steward, explored the file sharing features available to MS Teams users with MS PowerAutomate.

"PowerAutomate really is the workhorse to share files from Microsoft Teams," she said. "And I think that's just the beginning. PowerAutomate really enables a single data source. It connects to upwards of 60 different connectors. It can function across multiple Office 365 applications."

There is lot of application that can be used with PowerAutomate, said Farrell. "And it allows for document movement. And I use air quotes for 'movement' because when I go through the next steps of how we actually do this, you'll see why. But it does allow for the share-ability across all these applications. So next I'm going to go into really the nitty details of the workflow that we created in PowerAutomate to facilitate this document movement."

Microsoft created synced file links across the Microsoft Teams and the Project SharePoint site. "So I'm going to go through the steps just because if anyone's ever worked in PowerAutomate and is familiar with it, they know the defined details really matter. So the first thing you need to do when you create a workflow is to set a trigger. Our trigger is when a file is created or modified in the Microsoft Teams channel. So, as you can see here, the site address we have pointed to is the backend document library to that Microsoft Teams channel. Whenever a file is created—if it's edited, if it's deleted—this workflow will be triggered to run. Next, what it does is it actually gets uploaded file content. This is actually getting the file content using the file identifier, again, from that Microsoft teams channel."

And then the next step is this switch, said Farrell. And this is where you really have the ability to push this file anywhere you desire pretty much—anywhere there's a connector. "I'm only going to go over one of the options that we had built in, but this switch is based upon this shared-with value or this shared-with metadata column that I've been mentioning."

When somebody selects a file in the shared-with metadata, and they say, I want to share it to the SharePoint site, this next subset of steps occurs. In this first step, "get properties of the file in the document library," Microsoft has built in the outward-facing SharePoint site a specific document library.

"And what we want to do here is we want to actually see if that file already exists because remember the files that are coming from Teams and the files that are going to this outward-facing SharePoint site are two separate site collections." They're considered almost two separate file entities in themselves; even though they're the same, they're still separate site collections, said Farrell. "We identify if that file already exists in the SharePoint site by using the file name."

It's not an exact identifier, a file name, but Microsoft has tried to make it pretty specific, said Farrell. What this will do is it will look in the outward SharePoint site to see if a file with the same file name exists. And if it does, it will delete that file that exists in the SharePoint site. And then immediately next, what it will do is it'll re-create that file in the SharePoint site with the new content. So again, if it's modified, if it's deleted, it would be updated now in that outward-facing SharePoint site. "And then also the final step in this is to update the file properties because, like I said, we do have other metadata fields that we do want to track as this file moves across from Teams to various SharePoint sites. We want to keep all of that intact."

This last step enables that. "It enables us to keep the file metadata moving along with that file when we do move it across other places. The one thing I forgot to mention is that this SharePoint site—so the outward-facing place where we're basically moving this file—we have made this document library read-only to all visitors. So that's how we're able to kind of control that these files are read-only from a non-member-access point of view. So really if there's any changes or collaborations that are happening to that file, it's only happening in that Microsoft Teams space. People are only going to the SharePoint site to view files. There's no editing or collaboration happening. Everything's defined as being working in the Microsoft Teams. So, again, this is the, there's a lot of steps that are happening here, but from a user experience, this happens very quickly. It's on the order of 15, 20 seconds so even though there is document movement, there's a document being deleted and then re-created in a certain site. It happens so quickly. But from a user standpoint, we just say it's being synced. Because we don't want to add too much confusion."

Save the Date for KMWorld 2022—November 7–10, 2022—JW Marriott | Washington, DC!

KMWorld Covers
Free
for qualified subscribers
Subscribe Now Current Issue Past Issues