The Drive node manages files generated by skills directly from within a workflow. Use it to retrieve files, download files from external URLs, delete them, share or unshare them with your teams, or update their access constraints (password, expiry, download limit) programmatically.
Overview
| Property | Value |
|---|---|
| Inputs | 1 |
| Outputs | 1 |
| Output | $nodeLabel.files, $nodeLabel.status, $nodeLabel.file_id, $nodeLabel.download_url (varies by operation) |
Parameters
| Parameter | Type | Description |
|---|---|---|
driveOperation | string | Operation: get, getAll, downloadUrl, save, delete, setPassword, setTtl, setMaxDownloads, shareWithMyTeams, unshareWithMyTeams |
driveFileId | expression / select | UUID of the Drive file to manage (all operations except getAll, downloadUrl, and save) |
driveLimit | number | Maximum files to return (getAll only; empty means no limit) |
driveSourceUrl | expression | URL to fetch and store in Drive (downloadUrl only) |
driveFilename | expression | Full filename including extension (save only, e.g. 1.mp3) |
driveBase64Content | expression | Raw base64 string or data URL to decode and store (save only) |
driveIncludeBinary | boolean | Include file content as base64 in output (get only) |
drivePassword | expression | Password to set on the access token (setPassword only) |
driveTtlHours | number | Hours until the download link expires (setTtl only) |
driveMaxDownloads | number | Maximum allowed downloads (setMaxDownloads only) |
Getting the File ID
When a skill generates files, the output includes a _generated_files array. Each entry includes an id field:
{
"_generated_files": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"filename": "report.pdf",
"mime_type": "application/pdf",
"size_bytes": 45231,
"download_url": "https://your-domain.com/api/files/dl/abc123..."
}
]
}Reference the file ID with: $agentLabel._generated_files[0].id
Operations
| Operation | Required Fields | Description |
|---|---|---|
get | driveFileId | Retrieve file metadata (and optionally binary content) from Drive |
getAll | none | List owned and team-shared readable Drive files with metadata such as filename, MIME type, size, source, and download URL |
downloadUrl | driveSourceUrl | Fetch a file from an external URL and store it in Drive |
save | driveFilename, driveBase64Content | Decode base64 content and store it as a Drive file |
delete | driveFileId | Delete the file and all its access tokens from disk and database |
setPassword | driveFileId, drivePassword | Replace the default public token with a password-protected one |
setTtl | driveFileId, driveTtlHours | Replace the default public token with one that expires after N hours |
setMaxDownloads | driveFileId, driveMaxDownloads | Replace the default public token with one limited to N downloads |
shareWithMyTeams | driveFileId | Share the file read-only with all teams the workflow owner currently belongs to |
unshareWithMyTeams | driveFileId | Remove all team shares from the file |
Note: The
set*operations delete the default (no-constraint) public token and create a new one with the specified constraint. The updateddownload_urlis included in the output. Team sharing:shareWithMyTeamscreates explicit shares for the owner's current teams. Future teams are not added automatically unless the operation runs again.unshareWithMyTeamsremoves all team shares from the file.
Example — Download File from URL
{
"type": "drive",
"data": {
"label": "fetchReport",
"driveOperation": "downloadUrl",
"driveSourceUrl": "https://example.com/reports/q1.pdf"
}
}Reference the stored file downstream: $fetchReport.id, $fetchReport.download_url
The filename is taken from the Content-Disposition response header; if absent, it is derived from the URL path.
Example — Save Base64 Input to Drive
Use this when a text input node (or any upstream node) provides base64 file content:
{
"type": "drive",
"data": {
"label": "saveAudio",
"driveOperation": "save",
"driveFilename": "$userInput.body.filename",
"driveBase64Content": "$userInput.body.base64"
}
}Reference the stored file downstream: $saveAudio.id, $saveAudio.download_url
driveBase64Content accepts a raw base64 string or a data:...;base64,... data URL. MIME type is inferred from the filename extension.
Example — Get File and Use Binary in Vision LLM
{
"type": "drive",
"data": {
"label": "fetchImage",
"driveOperation": "get",
"driveFileId": "550e8400-e29b-41d4-a716-446655440000",
"driveIncludeBinary": true
}
}Reference the base64 content downstream: $fetchImage.file_base64
Images returned via file_base64 are displayed inline in the debug panel when you run the workflow.
Example — List Drive Files
{
"type": "drive",
"data": {
"label": "listFiles",
"driveOperation": "getAll",
"driveLimit": 50
}
}Reference the first returned file downstream: $listFiles.files[0].filename, $listFiles.files[0].size_bytes
Example — Delete File After Processing
{
"type": "drive",
"data": {
"label": "cleanup",
"driveOperation": "delete",
"driveFileId": "$generateReport._generated_files[0].id"
}
}Example — Set Password on Generated File
{
"type": "drive",
"data": {
"label": "protectFile",
"driveOperation": "setPassword",
"driveFileId": "$generateReport._generated_files[0].id",
"drivePassword": "$input.password"
}
}Example — Set Expiry (TTL)
{
"type": "drive",
"data": {
"label": "expireFile",
"driveOperation": "setTtl",
"driveFileId": "$generateReport._generated_files[0].id",
"driveTtlHours": 24
}
}Example — Limit Downloads
{
"type": "drive",
"data": {
"label": "limitDownloads",
"driveOperation": "setMaxDownloads",
"driveFileId": "$generateReport._generated_files[0].id",
"driveMaxDownloads": 3
}
}Example — Share With My Teams
{
"type": "drive",
"data": {
"label": "shareReport",
"driveOperation": "shareWithMyTeams",
"driveFileId": "$generateReport._generated_files[0].id"
}
}Team members can view and download the file from Drive and use read operations in workflows. They cannot delete, re-share, or change public link constraints.
Example — Unshare From My Teams
{
"type": "drive",
"data": {
"label": "unshareReport",
"driveOperation": "unshareWithMyTeams",
"driveFileId": "$generateReport._generated_files[0].id"
}
}Converting a file
Format conversion moved to the Converter node. Store or fetch the file with Drive, then hand its id to a converter node:
{
"type": "converter",
"data": {
"label": "convertDoc",
"conversion": "fileConvert",
"converterFileId": "$reportAgent._generated_files[0].id",
"converterTargetFormat": "pdf"
}
}The original file is preserved and the converted file is stored as a new Drive file.
Output Access
get:
$nodeLabel.id— UUID of the file$nodeLabel.filename— file name$nodeLabel.mime_type— MIME type (e.g.image/png)$nodeLabel.size_bytes— file size in bytes$nodeLabel.download_url— public download URL$nodeLabel.file_base64— base64-encoded file content (only when Include binary content is enabled)
getAll:
$nodeLabel.files— Array of file metadata objects$nodeLabel.count— Number of returned files$nodeLabel.files[0].id— UUID of the file$nodeLabel.files[0].filename— File name$nodeLabel.files[0].mime_type— MIME type$nodeLabel.files[0].size_bytes— File size in bytes$nodeLabel.files[0].download_url— Public download URL when a public token exists$nodeLabel.files[0].metadata— Stored metadata object$nodeLabel.files[0].created_at— File creation timestamp
downloadUrl:
$nodeLabel.id— UUID of the newly stored file$nodeLabel.filename— file name (fromContent-Dispositionor URL path)$nodeLabel.mime_type— MIME type detected from the response or file extension$nodeLabel.size_bytes— file size in bytes$nodeLabel.download_url— Drive download URL for the stored file
delete:
$nodeLabel.status—"deleted"$nodeLabel.file_id— UUID of the deleted file
setPassword / setTtl / setMaxDownloads:
$nodeLabel.status—"updated"$nodeLabel.file_id— UUID of the file$nodeLabel.download_url— New access token URL with the constraint applied
shareWithMyTeams:
$nodeLabel.status—"success"$nodeLabel.file_id— UUID of the file$nodeLabel.shared_team_count— Number of team shares after the operation
unshareWithMyTeams:
$nodeLabel.status—"success"$nodeLabel.file_id— UUID of the file$nodeLabel.shared_team_count—0after the operation
Ownership
Owner-only operations require the file to belong to the workflow owner. Read operations (get, getAll) can also access files shared with the workflow owner through a team.
Related
- File Generation - How skills generate files and the
_generated_filesoutput - Drive Tab - Visual file management in the dashboard
- Agent Node - Runs skills that generate files
- Converter Node - Convert a stored file to another format, or OCR it to text
- Expression DSL - Expression syntax for dynamic values