Actions35
- File Actions
- Folder Actions
- Room Actions
- User Actions
File → Upload File
AI-generatedSummary
Uploads a file to an ONLYOFFICE DocSpace room, folder, or the user's "My documents" section, using either text typed into the node or a binary field from the input item. Returns the info of the newly uploaded file.
Inputs
- authentication (required) — Auth method: API Key, Basic Auth, OAuth2, or Personal Access Token. The matching credential must be configured.
- isMyDocuments (required) — If true, uploads to the authenticated user's "My documents" folder. The node looks up that folder's ID automatically.
- parentId (required) — ID of the target room or folder. Shown only when 'To My Documents' is off.
- binaryData (required) — Switch between uploading binary data from the input item (true) and text content typed in the node (false).
- fileName (required) — File name including extension. Required when Binary File is off. When Binary File is on it's optional, and an empty value falls back to the binary's own file name. The operation errors if no name can be determined.
- fileContent (required) — Text content of the file. Shown only when Binary File is off. It is uploaded as text/plain, UTF-8 encoded.
- binaryPropertyName (required) — Name of the input binary field holding the file (default 'data'). Shown only when Binary File is on. The file's MIME type is taken from the binary data.
Output shape
One JSON item per input item, containing the DocSpace file info object for the uploaded file (fetched after upload via the file info endpoint).
The upload creates a session and sends the data in 10 MB chunks. It errors if the session doesn't complete. With 'Continue On Fail' enabled, a failed item returns {error: message} instead. No binary data is returned.
Examples
Example 1: Save a file received by a webhook or downloaded from another service into a DocSpace room.
To My Documents: off; Parent ID: the room's ID; Binary File: on; Input Binary Field: data; File Name: empty to keep the original name.
Example 2: Write generated text (e.g. a report or log) to the user's My documents.
To My Documents: on; Binary File: off; File Name: report.txt; File Content: ={{ $json.text }}