Skip to main content

Google Drive: Download File

Controlled node

Overview

Downloads a file from a connected Google Drive account and saves it as a temporary file in the project's library. This node requires a Google Drive connection to be configured in the project settings.

The node handles the authentication and download process automatically, returning a file object that can be used with other nodes such as Read PDF, Read Image, or Read Document.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the download operation from Google Drive.-
SourceDataExternal file source selection. Configure via the node's UI panel to select the Google Drive connection and specific file to download.-

Outputs

OutputTypeDescription
DoneEventFires when the file has been successfully downloaded to the library.
OutputDataThe downloaded file object containing id, name, mimeType, size, and dir (directory) properties. Returns null if no file was selected or the download failed.

Runtime Behavior and Defaults

When triggered, the node performs the following operations:

  1. Connection Validation: Verifies that a valid Google Drive connection exists and has the necessary permissions to access the requested file.
  2. File Download: Downloads the selected file from Google Drive to a temporary location in the project's library storage.
  3. Metadata Creation: Creates a library file entry with the appropriate MIME type and metadata.
  4. Cleanup: Removes any temporary local files after successful upload to library storage.
File Size Limits

Large files may take longer to download and process. The node handles the download asynchronously and will fire the Done event once the file is fully available in the library.

Connection Requirements

Ensure your Google Drive connection has the necessary scopes to read files. If the file is not accessible or the connection is invalid, the Output will return null or an error object.

Example Usage

Basic File Download

Connect a Start node or any trigger event to the Run input. Configure the Source input by selecting:

  1. A Google Drive connection from your project's connections
  2. The specific file you want to download from the file picker

Once triggered, the node will download the file and output the file object on the Output socket, which can be connected to document processing nodes.

[Start] --(run)--> [Google Drive: Download File] --(output)--> [Read PDF] --(text)--> [Show]
|
(done)
|
[Next Node]

Processing Downloaded Files

The output file object can be used with various reader nodes:

  • Connect to Read PDF to extract text from PDF documents
  • Connect to Read Image to process image files
  • Connect to Read Document to handle DOCX or other document formats
  • Connect to Write To Library to move the temporary file to a permanent location

The file object returned has the following structure:

{
"id": "file-uuid",
"name": "document.pdf",
"mimeType": "application/pdf",
"size": 1024000,
"dir": "temporary"
}