Skip to main content

Google Drive:Upload File

Controlled node

Overview​

Create a text, CSV or Word file in Google Drive.

Create a file from workflow data and upload it to Google Drive. Despite its name, this node takes content to turn into a file; it does not copy an existing library file or accept arbitrary binary uploads.

Inputs​

InputTypeDescription
runEventTriggers this operation.
dataDataContent to write: text, CSV text, an array of row objects for CSV, or Markdown text for a Word document.
fileNameTextBase name without an extension, such as weekly-report. The selected file type’s extension is added automatically. A connected value overrides the configured name.

Properties​

SettingTypeDescription
connectionConnectionSelect an authenticated Google Drive connection in this project with access to the destination.
folderFolderChoose the destination in the node’s folder picker. If unset, the connection’s permitted folder is used.
fileNameTextSet the base name here if it is not supplied through the input.
fileTypeChoiceChoose Text File (txt), CSV Table (csv) or Word Document (docx). Select the type explicitly before running.

Outputs​

OutputTypeDescription
outputDataBoolean true when a file is uploaded, or false when no upload succeeds. This is not a file object or download URL.
doneEventFires when the node returns, including when it returns an error result. Check the data output before continuing.

Content formats​

  • Text File: writes the supplied text. Other values are converted to text.
  • CSV Table: accepts an array of objects and writes column headers, or uses an existing CSV string as supplied.
  • Word Document: converts Markdown text into a DOCX document.

Each successful upload creates a new file. Check that output is exactly true before treating the upload as successful. Some failures can stop the run; review the logs if done is not reached.

Example​

Select the connection and destination, choose CSV Table, and set fileName to contacts. Connect a Data node with this array to data:

[
{ "name": "Alex", "email": "alex@example.com" },
{ "name": "Sam", "email": "sam@example.com" }
]

Trigger run from Start and inspect output on done. A successful run creates contacts.csv in the selected destination.

Project connections