5.23.13. Download files from a GDrive

<< Click to Display Table of Contents >>

Navigation:  5. Detailed description of the Actions > 5.23. Cloud services >

5.23.13. Download files from a GDrive

 

Icon: clip0571

 

Function: GDriveDownload

 

Property window:

 

clip0579

 

Short description:

 

Download files from a Google Drive.
 

Long Description:

 
This Action also works when accessing the web through a PROXY server: Please consult the section 5.1.9.2. for more details on this subject.

To be able to use this Action, you need to get these 3 parameters from Google: (1) your “Client ID”, (2) your “Client Secret”, (3) your “Refresh Token”. To get these 3 parameters, you must use the clip0572 “Unlock Google Services” action detailed in section 5.23.11.

 

The clip0573 GDriveDownload Action expects a table with (at least) 2 columns in input:
 

1.A column containing the “Remote File ID to download”: All the files in a gdrive are uniquely identified by their “File ID” (and not by their filepath). So, to download a file from your GDrive, you first need to get its “File ID”. There are two ways to get a “File ID”:
 

oUse the GDriveList Action from the previous section (section 5.23.11): This action gives as output a column named “FileID” that contains thea “File ID” that you want.

oNavigate on your GDrive (using a web-browser) to the file that you want to download and right-clik it: number1 . Then, select the “Get shareable link” option: number2

 

 

clip0574

 

 

You receive an URL inside your clipboard that looks like this:
 

https://drive.google.com/open?id=0BwGsipwcl6WCc3RhcnRlcl9maWxlX2Rhc2hlclYw

 

 
The “File ID” (that you are searching for) is the “id” parameter inside the url.
 

For example, in the above url, your “File ID” is:   0BwGsipwcl6WCc3RhcnRlcl9maWxlX2Rhc2hlclYw

 
 

2.A column containing the local filepath (i.e. the file path + the file name + the file extention) of the file(s) to create locally.

 

One option to create this second required column is to use the column named “Filename” originating from the clip0575 GdriveList Action. Unfortunately, this won’t always work properly because, for example, the “Google Spreadsheet files” do not have any extention (i.e. they should have a .xlsx extention but it’s missing). So, for your convenience, the clip0576 GdriveList Action also outputs another column named “FilePathWithExtention” that, basically, adds the missing file extentions to the “Google Spreadsheet” files, the “Google document” files, etc.

 

Here is a small example of usage of the clip0577  GDriveDownload Action:

 

clip0578