Get File
Retrieves information about a previously uploaded file from Google's Gemini API.
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
- Connection Id - The connection ID obtained from the Connect node.
- File URI - The file URI returned from the Upload File node.
Output
- File - Detailed information about the file including metadata and status.
How It Works
The Get File node retrieves information about a previously uploaded file from Google's Gemini API. When executed, the node:
- Validates the provided connection ID and file URI
- Sends a request to the Gemini API to retrieve file information
- Returns detailed information about the file including:
- URI and name
- Display name
- MIME type
- Size in bytes
- Creation and update times
- Expiration time (if applicable)
- Processing state
- Error information (if any)
- Video metadata (for video files)
- Additional metadata
Requirements
- A valid Google Gemini API key
- Connection ID from a successful Connect node execution
- Valid file URI from a previous file upload operation
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Connection ID
- Empty or invalid File URI
- File not found (404 error or "not found" in error message)
- API errors from Google's Gemini service
Usage Notes
- The file URI must be the full URI returned from a file upload operation
- Files have expiration times set by the Gemini API
- The node provides time until expiration in the metadata
- File processing state is included in the response:
- Processing: File is being processed
- Active: File is ready for use
- Failed: File processing failed
- Video files include duration metadata
- Error information is provided if file processing failed
- The SHA256 hash of the file is included in the metadata