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:
CodePudding user response:
Here is the overall flow
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)
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'],'/'))
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.
Here are the screenshots from my storage account and SharePoint
Storage Account
Sharepoint