There could be the scenario where you want to copy the file that gets upload in SharePoint to your Azure Storage account. I have a scenario where the file from any source will get uploaded in SharePoint folder (it could be a manual upload of dumped by any automatic process) once it is uploaded, we need to copy that file from there to the ADLS (Azure Data Lake Storage).
Tool used for the movement: Azure Logic App
I have designed a Logic app flow that does this operation.
Lets design the flow.
First you need to create a logic app (you can follow the initial step in the previous blog to create the Logic App).
Once it is created, navigate to the logic App designer.
- Click on Choose an operation and search for the SharePoint connector.
- Select the Trigger “When a file is created (properties only)”.
You can actually see two types of trigger (Properties Only and Deprecated). Do not use the Deprecated as it will be discontinued by MS.
- Configure the connection by providing your credential to your SharePoint site.
- Once the connection is made, you can see the list of sites to which you have access, you can choose the once to which this flow should point.
- select the SharePoint Library.
- Initially you cannot see the option to select the folder where you are expecting the file. You need to click on the Add a New Parameter and check the Folder option.
- Now you can see the option and you can browse to the folder where you are expecting the file to get dropped.
- You need to specify the frequency of this flow to check the SharePoint Folder that you have specified in the above step.

- Since we have selected the trigger which will provide the properties of the file. We need to add another Action to get the file content.
- Click on Add Action (+ symbol) and search for the SharePoint and choose the action as Get File Content.
- Select your SharePoint site.(it should be same to what you have provided in the first step)
- In the second option pass the dynamic content “Identifier”.

- From the above action we have got the file content as well. Now it is time to create the blob in the storage.
- Click on Add an Action and search for the Azure Blob Storage connector, select the Action as Create Blob(V2) and make the connection with your storage.

Mention the connection display name (as per your wish). You have options to select the authentication type. I prefer to go with the AD authentication as it would inherit your details automatically and you don’t need to mention any other connection details.
- Once the connection is done, select or manually enter the storage account name.
- Browse the folder where you want the file to be created.
- In Blob Name option enter the dynamic content “File name with extension” or you can just put “Name” if you don’t want the extension.
- In Blob Content enter the dynamic content “File Content”.

Now our flow is ready, click save and its time to test the flow.
Drop a file in the folder to which your Logic App Flow is pointing. Since I have kept the frequency to check the folder every min, it will go ahead and will take the file payload and move to Azure storage.
The flow ran successfully.


Note: Even when the flow is scheduled to run every minute, it will take the payload only once. So even the file stays there it will not move it continuously.
