Sync SharePoint Document Library with Azure Blob using Logic Apps

SC Vinod
4 min readAug 24, 2018

With no code solutions being advocated and lauded these days, features like Azure Logic Apps and Microsoft Flow are the go to solutions to orchestrate a workflow of tasks that encompasses various applications. In this article, I will discuss about creating a workflow using Azure Logic Apps to keep Azure Blob Storage and a SharePoint Document Library in sync.

As we know, both Azure Blob Storage and SharePoint Document Libraries could be used to store files of any types. Follow the below steps to design a workflow using Azure Logic Apps to transfer the files from Azure blob storage container to a SharePoint document library.

1. Login to Azure portal.

2. Create a new storage account and a blob container.

3. Upload a couple of files in the container as shown below:

4. Create a new Azure Logic App to sync the blob files with a SharePoint document library.

5. Go to Logic App Designer and click on Blank Logic App as shown below:

6. Click on the Schedule trigger as shown below to configure the workflow to get triggered in a pre-defined interval:

7. Here I have configured the schedule to run every 1 hour:

8. Click on New Step and select Azure Blob Storage and click on List blobs from the available options. The List blob action will retrieve all the blobs from the container.

9. Give the connection name and select the storage account that you have created and hit on the Create button. This will create a new API Connection.

10. Once created, select the blob container that you have created in you storage account

11. Click on New Step and search and add the “For Each” action.

12. Select the “value” output from the List blobs action as the collection for the “For each” action to loop. The “value” will contain metadata all the blobs retrieved.

13. Search for and add a new action called “Get blob content using path” and choose the “path” output from the List blobs action as the value for Blob path. This action will load the content of the blob which will later be used to create the file in SharePoint.

14. Add a new action called “Create File” from the SharePoint connector. Fill in the site URL and choose the folder name which is nothing but the document library name to which you want the files copied.

15. For the “File Name” parameter choose the “Display Name” output value from the List Blobs action and for “File Content” parameter choose the “File Content” output value from the Get blob content action as shown below.

16. That’s it, the logic app should now look like below.

17. Save the app and click on Run. All the files in your blob storage in should now be copied over to your SharePoint document library.

--

--