Google Drive - Upload file action

The Upload file action uploads a file to Google Drive with multipart streaming uploads. There is no fixed file size limit.

Input

Input fieldDescription
File contentsEnter the contents of the file to upload. Accepts a datapill such as File contents from other Workato triggers and actions.
File nameDefine the name of the uploaded file. Defaults to Untitled if not provided.
Parent folderChoose the folder where the file is stored. Select from the picklist or enter the folder ID directly. Enter the folder ID in folder_id/shared_drive_id format for shared drives. For example, 1fm6iCMYrN7roZZ-ynpVFRTVq9mellrWp/0AB6ZFCw3XdamUk9PAA. Google Drive saves the file in My Drive if a value isn't provided.
Upload MIME typeDefine the MIME type of the file. For example, image/jpeg. Google Drive automatically detects the MIME type if not provided.
Target MIME typeSpecify the MIME type for conversion after upload. For example, application/pdf. Refer to the Upload MIME types for Google Workspace documents guide for supported MIME types.
DescriptionEnter a description for the uploaded file.
StarredSpecify whether the file should be starred in Google Drive. Defaults to No.
Viewers can copy contentEnable or disable content copying for users with View access. Defaults to Yes.
Writers can shareEnable or disable file sharing for users with Edit access. Defaults to Yes. This setting applies to My Drive but not shared drives.
Chunk size (KB)Adjust the chunk size for optimized throughput. Larger values increase speed but may hit API limits. Defaults to 1024 KB. Refer to File streaming for more information.
Copy requires writer permissionSpecify whether to disable these actions for readers and commenters. Defaults to No.
PropertiesProvide key-value pairs visible to all users.

MIME TYPE CONVERSION LIMITATIONS

Google Drive doesn't support all MIME type conversions mentioned in its API documentation. Some common limitations include the following:

  • GIF/BMP conversion: This conversion isn't supported.

  • Plain text to Google Sheets: Set Upload MIME type to CSV. The file converts to a Google Docs document if you set the field to Plain Text.

  • HTML to Google Docs: Google Drive only accepts specific HTML formats. You may need to manually adjust formatting. We recommend that you use text/html as a custom value instead of selecting HTML from the picklist. Contact Google Support if you need assistance with supported HTML formats.

  • JSON/Plain text to Google Apps Script: Only specific formats are accepted, which are not well documented in the Google Drive API. Contact Google Support if you need assistance with supported formats.

Output

Output fieldDescription
KindDisplays whether the uploaded file is a file or folder.
IDReturns the unique ID of the uploaded file.
NameName of the uploaded file.
Mime typeThe MIME type of the uploaded file.
ParentsThe list of parent folder IDs that contain the file/folder, such as the List size and List index.
DescriptionA short description of the file.
StarredIndicates whether you have starred the file.
Viewers can copy contentIndicates whether users with View access can copy content.
Writers can shareIndicates whether users with Edit access can share the file. This field is not populated for shared drive files.
PropertiesReturns custom key-value pairs assigned to the file.

Last updated: