Last Updated: Mar 8, 2023
Use this function to upload the specified file in a selected folder to the Google Drive instance.
Upload File (upload_file_path, upload_file_name, parent_folder_id, attachment_type, private_key, client_email)
| Input Parameter Name | Description |
|---|---|
| upload_file_path | Path of the file to be uploaded including the filename with the extension |
| upload_file_name | Name of the uploaded file in the Drive |
| parent_folder_id | ID of the folder where the file has to be uploaded |
| attachment_type | MIME type of the type of file to be uploaded For more information, refer to the below table Attachment Types |
| private_key | Private key of the service account |
| client_email | Email ID of the service account |
| Return Value | Description |
|---|---|
| Output |
|
Upload File (Upload File (C:\Downloads\Invoice.pdf, UploadedInvoice.pdf, ABC123, application/pdf, —–BEGIN PRIVATE KEY—–\nABCD\n—–END PRIVATE KEY—–, name@project-id.iam.gserviceaccount.com))
| MIME Type | File Extension |
|---|---|
| application/msword | .doc |
| application/vnd.openxmlformats-officedocument.wordprocessingml.document | .docx |
| application/vnd.ms-excel | .xls |
| application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | .xlsx |
| application/vnd.ms-powerpoint | .ppt |
| application/vnd.openxmlformats-officedocument.presentationml.presentation | .pptx |
| application/pdf | |
| image/jpeg | .jpeg |
| image/png | .png |
| text/css | .css |
| text/csv | .csv |
| text/html | .html |
Provide MIME Type for input parameter attachment_type, for example, if extension is .css provide text/css for input parameter attachment_type.
This list is not exhaustive.
To view all the Google Drive functions, click here.