<!-- BusyBot node reference — https://busybot.net/tools/nextcloud/ -->

> Node: Nextcloud (`nextcloud`) · Action (binary) · v1
> Category: Data & Storage · Credentials: Nextcloud API (`nextCloudApi`)
> Updated: 2026-08-16

# Nextcloud

> Manage files, folders, and users on Nextcloud

## Overview

Provides file, folder and user management for self-hosted Nextcloud instances across three resources. **File** covers copy, delete, download (binary), move, share and upload (binary or text). **Folder** covers copy, create, delete, list, move and share. **User** covers create, delete, get, get many and update.

Download writes the file to a binary property on the output item; upload reads binary data from an upstream item or accepts text content directly. File and folder work goes over WebDAV; sharing and user administration go over the OCS REST API. The node authenticates with HTTP Basic Auth.

**Category:** Data & Storage  
**Tool Name:** `nextcloud`  
**Version:** 1

**Appearance:** Icon: `si-nextcloud` | Color: `#0082C9`

## Node Type

**Action (Binary)** — handles file/binary data operations

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Nextcloud API** credentials.
See the [Credentials Guide](https://busybot.net/credentials/next-cloud-api/) for setup instructions.

### Resources

| Resource | Value |
|----------|-------|
| File | `file` |
| Folder | `folder` |
| User | `user` |

### Operations

The available operations depend on the selected resource — file operations first, then folder, then user.

| Operation | Value | Description |
|-----------|-------|-------------|
| Copy | `copy` | Copy a file |
| Delete | `delete` | Delete a file |
| Download | `download` | Download a file |
| Move | `move` | Move a file |
| Share | `share` | Share a file |
| Upload | `upload` | Upload a file |
| Copy | `copy` | Copy a folder |
| Create | `create` | Create a folder |
| Delete | `delete` | Delete a folder |
| List | `list` | List folder contents |
| Move | `move` | Move a folder |
| Share | `share` | Share a folder |
| Create | `create` | Create a new user |
| Delete | `delete` | Delete a user |
| Get | `get` | Get a user |
| Get Many | `getAll` | Get many users |
| Update | `update` | Update a user |

### Parameters

#### File: Copy

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| From Path | `string` | Yes | — | The path of the file or folder to copy. Must start with "/". Supports expressions. |
| To Path | `string` | Yes | — | The destination path. Must start with "/". Supports expressions. |

#### File: Delete

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Path | `string` | Yes | — | The path to delete. Must start with "/". Supports expressions. |

#### File: Download

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| File Path | `string` | Yes | — | The full file path to download. Must start with "/". Supports expressions. |
| Binary Property | `string` | Yes | `data` | Name of the output binary property to store the file in. Names are case-sensitive — see the upstream node's Binary Data panel for the exact names to use. |

#### File: Move

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| From Path | `string` | Yes | — | The path of the file or folder to move. Must start with "/". Supports expressions. |
| To Path | `string` | Yes | — | The new path. Must start with "/". Supports expressions. |

#### File: Share

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Path | `string` | Yes | — | The file or folder path to share. Must start with "/". Supports expressions. |
| Share Type | `options` | No | `0` | The type of share. |
| | | | | Options: `0` (User), `1` (Group), `3` (Public Link), `4` (Email), `7` (Circle) |
| User | `string` | No | — | The user to share with. _(shown when Share Type is `0`)_ |
| Group ID | `string` | No | — | The group ID to share with. _(shown when Share Type is `1`)_ |
| Email (`shareEmail`) | `string` | No | — | The email address to share with. _(shown when Share Type is `4`)_ |
| Circle ID | `string` | No | — | The circle ID to share with. _(shown when Share Type is `7`)_ |
| Options (`shareOptions`) | `collection` | No | `{}` | Extra share settings. |
| — Password | `string` | No | — | Password for public link shares. _(shown when Share Type is `3`)_ |
| — Permissions | `options` | No | `1` | The share permissions to set. |
| | | | | Options: `1` (Read), `2` (Update), `4` (Create), `8` (Delete), `31` (All) |

#### File: Upload

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| File Path | `string` | Yes | — | The destination file path. Parent folder must exist. Existing files are overwritten. Must start with "/". Supports expressions. |
| Binary File | `boolean` | Yes | `false` | Whether to upload binary data from an input binary property. |
| File Content | `string` | No | — | The text content of the file to upload. Supports expressions. _(shown when Binary File is `false`)_ |
| Binary Property | `string` | Yes | `data` | Name of the input binary property containing the file to upload. Names are case-sensitive — see the upstream node's Binary Data panel for the exact names to use. _(shown when Binary File is `true`)_ |

#### Folder: Copy

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| From Path | `string` | Yes | — | The path of the file or folder to copy. Must start with "/". Supports expressions. |
| To Path | `string` | Yes | — | The destination path. Must start with "/". Supports expressions. |

#### Folder: Create

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Folder | `string` | Yes | — | The folder to create. Parent folder must exist. Must start with "/". Supports expressions. |

#### Folder: Delete

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Path | `string` | Yes | — | The path to delete. Must start with "/". Supports expressions. |

#### Folder: List

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Folder Path | `string` | Yes | — | The folder path to list. Must start with "/". Supports expressions. |

#### Folder: Move

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| From Path | `string` | Yes | — | The path of the file or folder to move. Must start with "/". Supports expressions. |
| To Path | `string` | Yes | — | The new path. Must start with "/". Supports expressions. |

#### Folder: Share

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Path | `string` | Yes | — | The file or folder path to share. Must start with "/". Supports expressions. |
| Share Type | `options` | No | `0` | The type of share. |
| | | | | Options: `0` (User), `1` (Group), `3` (Public Link), `4` (Email), `7` (Circle) |
| User | `string` | No | — | The user to share with. _(shown when Share Type is `0`)_ |
| Group ID | `string` | No | — | The group ID to share with. _(shown when Share Type is `1`)_ |
| Email (`shareEmail`) | `string` | No | — | The email address to share with. _(shown when Share Type is `4`)_ |
| Circle ID | `string` | No | — | The circle ID to share with. _(shown when Share Type is `7`)_ |
| Options (`shareOptions`) | `collection` | No | `{}` | Extra share settings. |
| — Password | `string` | No | — | Password for public link shares. _(shown when Share Type is `3`)_ |
| — Permissions | `options` | No | `1` | The share permissions to set. |
| | | | | Options: `1` (Read), `2` (Update), `4` (Create), `8` (Delete), `31` (All) |

#### User: Create

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Username | `string` | Yes | — | Username for the new user. Supports expressions. |
| Email (`email`) | `string` | Yes | — | Email address for the new user. Supports expressions. |
| Additional Fields | `collection` | No | `{}` | Optional profile values for the new user. |
| — Display Name | `string` | No | — | The display name of the new user. |

#### User: Delete

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Username | `string` | Yes | — | The username. Supports expressions. |

#### User: Get

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Username | `string` | Yes | — | The username. Supports expressions. |

#### User: Get Many

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Return All | `boolean` | No | `false` | Whether to return all users or limit the results. |
| Limit | `number` | No | `50` | Maximum number of users to return. _(shown when Return All is `false`)_ |
| Options (`userGetAllOptions`) | `collection` | No | `{}` | Extra search and paging options. |
| — Search | `string` | No | — | Search filter string. |
| — Offset | `number` | No | `0` | Pagination offset. |

#### User: Update

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Username | `string` | Yes | — | The username. Supports expressions. |
| Update Fields | `fixedCollection` | No | `{}` | The single attribute to change. |
| — Key | `options` | No | `email` | The attribute to update. |
| | | | | Options: `address`, `displayname`, `email`, `password`, `twitter`, `website` |
| — Value | `string` | No | — | The new value for the attribute. Supports expressions. |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

Every operation produces exactly one output item — nothing fans out. Results are merged into the input item's JSON, so the incoming fields stay available, and binary data on the input item is forwarded.

| Operation | Output |
|-----------|--------|
| `file` / `download` | JSON unchanged; the file is written to the binary property you named, alongside any binary already on the item. |
| `file` / `upload` | `success: true` and `path`. |
| `file` / `copy`, `move` and `folder` / `copy`, `move` | `success: true`, `fromPath`, `toPath`. |
| `file` / `delete`, `folder` / `delete` | `success: true` and `deletedPath`. |
| `file` / `share`, `folder` / `share` | The share record Nextcloud returned, flattened onto the item. |
| `folder` / `create` | `success: true` and `path`. |
| `folder` / `list` | An `entries` array — one object per child of the folder. |
| `user` / `create` | The new user's returned fields plus `userId`. |
| `user` / `get` | The user's profile fields. |
| `user` / `getAll` | A `users` array of `{ id }` objects. |
| `user` / `delete`, `update` | `status`, `statuscode` and `message` from the Nextcloud response. |

A folder listing looks like this:

```json
{
  "entries": [
    {
      "path": "/invoices/2019/invoice_1.pdf",
      "lastModified": "Tue, 04 Jun 2024 10:12:31 GMT",
      "contentLength": "48211",
      "contentType": "application/pdf",
      "type": "file",
      "eTag": "5f2a1c9b8d7e6"
    },
    {
      "path": "/invoices/2019/archive/",
      "lastModified": "Mon, 03 Jun 2024 08:00:00 GMT",
      "type": "folder",
      "eTag": "a1b2c3d4e5f60"
    }
  ]
}
```

The folder itself is excluded from the listing, and only one level down is returned. Because both `entries` and `users` arrive as arrays on a single item, use a Split Out node on `entries` or `users` to process each row separately.

## Usage Examples

- Download a file from Nextcloud
- Upload a binary file to Nextcloud
- Upload text content to Nextcloud
- List all files in a Nextcloud folder
- Create a folder on Nextcloud
- Share a file via public link
- Create a new Nextcloud user
- Get all Nextcloud users
- Move a file on Nextcloud

## Example Configuration

Upload text content as a file:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "file",
    "operation": "upload",
    "path": "/documents/example.txt",
    "binaryDataUpload": false,
    "fileContent": "{{ $json.body }}"
  }
}
```

Upload binary data coming from an upstream node:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "file",
    "operation": "upload",
    "path": "/images/{{ $json.fileName }}",
    "binaryDataUpload": true,
    "binaryPropertyName": "data"
  }
}
```

Download a file into a named binary property:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "file",
    "operation": "download",
    "path": "/documents/report.pdf",
    "binaryPropertyName": "downloadedFile"
  }
}
```

Copy a file:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "file",
    "operation": "copy",
    "path": "/documents/original.txt",
    "toPath": "/backup/original_copy.txt"
  }
}
```

Share a file with a single user, read-only:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "file",
    "operation": "share",
    "path": "/documents/shared_doc.pdf",
    "shareType": 0,
    "shareUser": "jsmith",
    "shareOptions": {
      "permissions": 1
    }
  }
}
```

Create a password-protected public link:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "file",
    "operation": "share",
    "path": "/public/presentation.pptx",
    "shareType": 3,
    "shareOptions": {
      "password": "linkpass"
    }
  }
}
```

Create a folder:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "folder",
    "operation": "create",
    "path": "/projects/new_project"
  }
}
```

List a folder's contents:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "folder",
    "operation": "list",
    "path": "/documents"
  }
}
```

Share a folder with a group, full permissions:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "folder",
    "operation": "share",
    "path": "/team/shared_folder",
    "shareType": 1,
    "groupId": "team_group",
    "shareOptions": {
      "permissions": 31
    }
  }
}
```

Create a user:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "user",
    "operation": "create",
    "userId": "{{ $json.username }}",
    "email": "{{ $json.email }}",
    "additionalFields": {
      "displayName": "{{ $json.fullName }}"
    }
  }
}
```

Search users with paging:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "user",
    "operation": "getAll",
    "returnAll": false,
    "limit": 50,
    "userGetAllOptions": {
      "search": "john",
      "offset": 0
    }
  }
}
```

Change a user's email address:

```json
{
  "type": "nextcloud",
  "parameters": {
    "resource": "user",
    "operation": "update",
    "userId": "existinguser",
    "updateFields": {
      "field": {
        "key": "email",
        "value": "newemail@example.com"
      }
    }
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Manage files, folders, and users on a self-hosted Nextcloud instance via WebDAV and OCS APIs.

- **Every path is absolute and starts with `/`.** Paths are relative to the root of the account the credential belongs to.
- **Parent folders are not created for you.** Upload and folder Create both fail if the containing folder does not exist yet — chain a folder Create per level when building a new tree.
- **Upload overwrites silently.** An existing file at the destination path is replaced.
- **Transfers are capped at 512 MB** in each direction; larger files are rejected before any data is buffered.
- **The recipient field follows Share Type.** User shares need User, group shares need Group ID, email shares need Email, circle shares need Circle ID, and public links need none of them. The Password option only applies to public links.
- **Update changes one attribute at a time.** Update Fields holds a single key/value pair, so changing an email and a display name takes two runs of the node.
- **HTTPS is required** for anything other than a loopback address, because Basic Auth credentials would otherwise travel in cleartext.
- **Folder List returns one level.** The folder itself is omitted and subfolders are listed but not descended into.