Support Portal

for ProcessRobot and WinAutomation

Start a new topic

Download from OneDrive shared file link

Hi


Is there anyway to download a file with a onedrive shared file link, using the Download from Web or Invoke Web Services actions?


This is a link to an empty Text file: 


https://1drv.ms/t/s!AtRb4-qI8u-1ps8kwF5aIN0l1HHnsw?e=8PVB6H


All I get is a text file with the html for the page with the file where there is a download button.


Any tips?


ADMIN

Hello Rupert,


The link seems to be navigating to the one drive page where you can download it from. It could be why, the actions you've tried have downloaded the html page as such.


You can try treating it as a webpage itself and use actions to,

1. open the url

2. click the download button

Hi Shravan


Thanks for your pointer.


I have been working on this some more and, as you say, my first problem is that its not a download link, just a sharing link.


What I am really aiming for is to be able to share a file and then get a download link for the shared file through CLI approaches. My current thinking is Powershell and API calls.


You suggestion is valid, however I am now trying to start using API calls where possible. To cut a long story short I have got as far as understanding, registering and obtaining OAuth tokens from OneDrive, via registering an app on Azure but I am not really clear about whether that will allow me to make API calls to my personal OneDrive or which call to use.


I am struggling with the syntax for the header and body in the API call.  I will settle for any combination of CLI approaches though, if it is indeed possible to do. In my scenario I will be getting the link from within my own domain as the admin of the OneDrive (Personal) account.


Any tips welcome. Thanks.

ADMIN

Hi Rupert,


You can use the "Invoke Web Services" action to worth with API calls in your process.


You may refer to the following articles and examples, which can help you with your API call :


Sample API call and Parsing 

Search for Location Co-ordinates (lat/long) using Google API Key 

Invoke Web Service Action API call 

SOAP type API calls 

Reading data from Google sheets using Google APIs 


Hope this helps.


1 person likes this
Login or Signup to post a comment