Recently we had a requirement to upload a document (pdf) to a SharePoint folder.
We had the URL of the field saved in one of the fields of the Contact table in Dynamics 365 / Dataverse.
Below is our field and the URL in it. (the URL points to the Manual of Fulla 2, one among many awesome products by Schiit)
Below is how our flow looks like
Here we already have Server-Based SharePoint integration enabled. https://nishantrana.me/2023/07/28/based-on-entity-behavior-for-sharepoint-folder-dynamics-365-dataverse/
The flow triggers when there is an update in the File URL field of the contact record.
Next, we are using HTTP action to use the GET method to get the content of the file. As it is a public URL we haven’t specified any Authentication.
Next, we are using Create File action of SharePoint, we have specified the Site Address, Folder Path, File Name, and most importantly the Body of the HTTP action to the File Content property.
On the successful run of the flow,
we can see the document (pdf) uploaded in the SharePoint folder.
Hope it helps..
One thought on “How to – Upload a file by URL to SharePoint (Power Automate / Dataverse)”