Showing results for 
Search instead for 
Did you mean: 

Syncing Storage Areas in Teams Tabs with Flow

This is the third post in a series. The previous two touch on utilizing metadata to manipulate and publish content via Flow.


Microsoft Teams is a chat -based collaboration tool that Microsoft has rolled in to Office 365 to streamline communication with businesses. The simple chat structure and abilities to control access, add tabs, chatbots, and many of the other services of Office 365 make it a seamless way for business users to get it done.


It is possible to add a document library as a tab in Teams channels, and this post is going to show how you can sync (creation and deletion) such a document library with an external storage source via Flow.


Before we get started, I always like to note that whenever you enable your end users to share content externally, there should always be a plan around the governance and security aspects of the process- this is especially true of areas that are intentionally designated for sharing with external users. 


It is also worth noting that there are many Flow templates for one way syncing and a few even two way; many times this is for when Documents are updated- this example is for the creation and deletion of documents only, and is more of a template for  a quick way to make this happen in Teams.


You can also Sync this with Azure Blob Storage, FTP Servers, Google Drive, Box, and of course personal One Drives or One Drives For Business (and a few others).


In reference to the previous posts on manipulating files via Metadata in Flow, is currently not possible to directly manipulate metadata values via Document Libraries that have been added to Microsoft Teams Channels via the tabs in Teams, BUT you can add the SharePoint Site directly via the Teams Tab and allow users to manipulate metadata in Teams by selecting the "See All" option for an embedded Document Library in the Team.


Untitled picture.png


Though the last post focused on Azure Blob Storage for publishing; in this example we will focus on syncing with a DropBox Location.


We will sync a Document Library in the tab for the Engineering channel in the team. Adding the Document Library in the tab will simply expose all the documents in the Library, similar to the "Files" view, therefore we will NOT sync a subfolder in the Shared Documents Library for the Group/Team SharePoint Team Site; I have created a new library named "Engineering-Sync" for this purpose.



Untitled picture.png

Now that we know what we're going to make happen, let's hop into it!


The first step in Flow is to create a new Flow from blank. Then select the "When a File is created in a folder" trigger to get things going.


Untitled picture.png


Choose the site address for the document library and Folder you'd like to see synced- this will need to include the "Forms/Documents/" folders under any new library you create.


The next step will be to add the action "Create a File" for DropBox. You will then need to establish the connection to DropBox, and then Specify which folder in DropBox you'd like to sync. It would be best to be very clear in your naming convention, in this example I've named a folder "Mark8Team-Engineering"


For the next two values, be sure and choose the corresponding Dynamic Content Data requested by the fields:


Untitled picture.png


Ok! Now the first part of this flow is complete! When a file is created in the Document Library, the same file will be created in DropBox.


To have files deleted in DropBox when they are deleted in the Document Library, you'll need to setup a second Flow:


When you select "Create from Blank", choose the SharePoint trigger "When a File is deleted." Be sure and select the same Document Library and site…


Untitled picture.png


And then, add the action for DropBox "Delete file". Be sure and add the file name with extension after the folder path in DropBox for the file in question, as shown below:


Untitled picture.png


Now, let's visit the Channel Tab for our Document Library and give it a test!


Ok, So I uploaded my file in the Team Channel Tab Library… 


And the creation of the file in DropBox was almost instant!


Untitled picture.png


Now, I'm going to delete the file in the Document Library…


And Success!!


Untitled picture.png

I hope that this use case can be used as a launcher for other ideas to help your business users interact with Teams in an easier way!

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Cambridge UK Power Platform User Group Leader, Technical evangelist and speaker. Always says yes to coffee! #LetsGetCoffee
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor