Home > Software engineering >  I want to transfer files as well as folders which is in same structure in blob storage to sharepoint
I want to transfer files as well as folders which is in same structure in blob storage to sharepoint

Time:10-20

The files will get updated in blob storage everyday so I want in incremental method which transfer only new files and create folder in SharePoint if it is not exists. For example mycontainer/folder/20210101/test.csv , mycontainer/folder/20210102/test.csv the csv files may be single file or multiple files. I have created workflow in logic app but somehow I got stuck here I am attaching my screenshot of my workflow. Image screenshot:

enter image description here

CodePudding user response:

Here is the overall flow enter image description here

This is how I achieved your requirement

I first built a folder where files will be added on a daily basis, and then I used compose connector to retrieve the 'LastModifiedDate' from it.

Here is the Compose Connector Expression that I used [Compose]

substring(join(split(triggerBody()?['LastModified'],'-'),''),0,8)

enter image description here

Later I have created another folder with it and added the file to that folder. Then I used compose connector in order to get the path

Here is the Path Compose Connector [Compose2]

substring(body('Create_blob_(V2)')?['Path'],0,lastIndexOf(body('Create_blob_(V2)')?['Path'],'/'))

enter image description here

Lastly, I have used a SharePoint connector and created a folder using the above path where in the next step I created a file same as the blob structure.

enter image description here

Here are the screenshots from my storage account and SharePoint Storage Account

enter image description here


Sharepoint

enter image description here

  • Related