Last Updated: Feb 14, 2022
Use this function to download a google file like Google Sheets or Google Docs etc., from Google Drive.
Download Google File (file_id, attachment_type, file_path, private_key, client_email)
Input Parameter Name | Description |
---|---|
file_id | ID of the Google file |
attachment_type | MimeType of the file For more information, refer to the below table MIME Types |
file_path | Path to download the file along with the name and extension to download the file as |
private_key | Private key of the service account |
client_email | Email ID of the service account |
Return Value | Description |
---|---|
Output |
|
Download Google File (XYZ123, application/vnd.google-apps.document, C:\Downloads\Invoice.docx, —–BEGIN PRIVATE KEY—–\nABCD\n—–END PRIVATE KEY—–, name@project-id.iam.gserviceaccount.com)
MIME Type | File Type |
---|---|
application/vnd.google-apps.document | Google Docs |
application/vnd.google-apps.drive-sdk | 3rd party shortcut |
application/vnd.google-apps.drawing | Google Drawing |
application/vnd.google-apps.file | Google Drive file |
application/vnd.google-apps.folder | Google Drive folder |
application/vnd.google-apps.form | Google Forms |
application/vnd.google-apps.fusiontable | Google Fusion Tables |
application/vnd.google-apps.map | Google My Maps |
application/vnd.google-apps.presentation | Google Slides |
application/vnd.google-apps.script | Google Apps Scripts |
application/vnd.google-apps.shortcut | Shortcut |
application/vnd.google-apps.site | Google Sites |
application/vnd.google-apps.spreadsheet | Google Sheets |
This list is not exhaustive.
Ensure that Full Control permission is given to Users for the path given. To check this, right-click on the folder and choose the Security option.
To view all the Google Drive functions, click here.