Export File
Exports a Google Workspace file (Docs, Sheets, Slides) to a different format and saves it to the local file system.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Drive Id - The identifier for the connected Google Drive service obtained from the Connect node.
- File Id - The unique identifier of the Google Workspace file to be exported.
- File Path - The local file path where the exported file should be saved.
Options
- Mime Type - The format to export the file to. Supported types include:
- Default (application/octet-stream)
- pdf (application/pdf)
- csv (text/plain)
- jpeg (image/jpeg)
- png (image/png)
- txt (text/plain)
- doc (application/msword)
- xls (application/vnd.ms-excel)
- xlsx (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
- html (text/html)
- pptx (application/vnd.openxmlformats-officedocument.presentationml.presentation)
How It Works
The Export File node converts a Google Workspace file to a different format and saves it to the local file system. When executed, the node:
- Validates the required inputs (Drive Id, File Id, and File Path)
- Validates the selected Mime Type option
- Retrieves the Google Drive service client using the provided Drive Id
- Uses the Google Drive API to export the file with the Files.Export.Download method
- Creates or opens the specified local file path
- Copies the exported file content to the local file
Requirements
- A valid Google Drive connection established using the Connect node
- The File Id of an existing Google Workspace file (Docs, Sheets, Slides, etc.)
- Appropriate permissions to read the file
- Sufficient disk space to store the exported file
- Write permissions to the specified file path
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Drive Id
- Empty or invalid File Id
- Empty or invalid File Path
- Invalid Mime Type selection
- Google Drive API errors during file export
- Insufficient permissions to read the file
- Insufficient disk space
- Unable to create or write to the specified file path
- Attempting to export a file type that doesn't support the selected format
Usage Notes
- This node is specifically for Google Workspace files (Docs, Sheets, Slides) that can be exported to different formats
- The node will overwrite existing files at the specified path without warning
- Not all file types can be exported to all formats - Google has specific conversion rules
- Large files may take longer to export depending on the complexity and network conditions
- Make sure the specified directory exists and is writable
- The exported file is saved locally and is no longer connected to the original Google Workspace file