Upload File

google_drive.upload_file
ActionFiles & storageconnection required

Calls Drive files.create (multipart upload). Needs a read/write Drive scope (drive or drive.file) on the connection.

Create a file in Google Drive from a body or an upstream file blob.

Connection

Required
Yes — the node will not save without one
Auth type
OAuth 2.0
Providers
Google Drive
Secret shape
{"client_id", "client_secret", "refresh_token"}
Config it needs
token_uri
Resolved by
config.connection_id, else node.connection_id

Configuration

6 fields, none required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
name
File name in Drive; defaults to the upstream blob's filename.
stringNo———
folder_id
Destination folder id.
stringNo———
body
File content; omit to use the upstream file.
stringNo———
content_encoding
Set to 'base64' when body is a base64 blob (e.g. from a download_archive node). Defaults to the upstream file's encoding, else text.
stringNo—one of "text", "base64"—
content_type
MIME type of the content.
stringNo———
description
Optional Drive description.
stringNo———

Input

FieldTypeExample
file_content
The file, base64-encoded.
string—
content_encoding
stringbase64
filename
stringapp-main.zip
content_type
stringapplication/zip
size
Raw size in bytes (before base64).
number—

Output

One shape.

file

FieldTypeExample
id
The Drive file id.
string—
name
File name as shown in Drive.
string—
mime_type
Drive mime type; folders are application/vnd.google-apps.folder.
string—
size
Bytes, when known (Google-native docs report none).
number—
modified_time
RFC 3339 timestamp of the last content change.
string—
web_view_link
Open-in-Drive URL.
string—
created_time
RFC 3339 timestamp of creation.
string—
trashed
True when the file is in the bin — files.get returns it either way.
boolean—
parents
Ids of the folders holding this file.
array—
icon_link
Small icon URL for the file type.
string—
web_content_link
Direct download URL (binary files only).
string—
description
The file's description, when it has one.
string—
shared
True when the file is shared beyond its owner.
boolean—
starred
True when the user starred the file.
boolean—
drive_id
Shared Drive id, present only for shared-drive items.
string—
md5_checksum
MD5 of the content; use it to tell a changed file from a touched one.
string—
file_extension
Extension of the uploaded content, when any.
string—
owners
Owners as {display_name, email_address}.
array—
last_modifying_user
Who last changed it, as {display_name, email_address}.
object—
shortcut_details
For a shortcut: {target_id, target_mime_type}.
object—
{
  "created_time": "",
  "description": "",
  "drive_id": "",
  "file_extension": "",
  "icon_link": "",
  "id": "",
  "last_modifying_user": {},
  "md5_checksum": "",
  "mime_type": "",
  "modified_time": "",
  "name": "",
  "owners": [],
  "parents": [],
  "shared": false,
  "shortcut_details": {},
  "size": 0,
  "starred": false,
  "trashed": false,
  "web_content_link": "",
  "web_view_link": ""
}

See Upload File run in a workflow.

In a technical demo we add the Google Drive connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.