# Nextcloud

> Keep files in Nextcloud in order: save files and text, read, find, move, copy and delete them, make folders and share links. Start a workflow when a file is added to a folder.

App · 14 actions. Web page: https://docs.lodol.com/docs/integrations/nextcloud

## Actions

### Copy file or folder

Copy a file or folder to another path.

**Inputs**

- From (`source`, text, required): The file or folder, such as Inbox/Report.pdf.
- To (`destination`, text, required): Its new path, name included, such as Archive/2026/Report.pdf.
- Replace (`overwrite`, true/false): Write over anything already at the new path. Off by default. Default: `false`.

**Outputs**

- `content_type` (text): Its type, such as application/pdf; empty for a folder
- `etag` (text): A tag that changes whenever it does
- `file_id` (text): Nextcloud's number for it
- `kind` (text): file or folder
- `link` (text): A link that opens it in Nextcloud, for people with access
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name
- `path` (text): Its path, such as /Documents/Report.pdf
- `size` (number): Its size in bytes; for a folder, everything in it

**Example output**

```json
{
  "content_type": "application/pdf",
  "etag": "6720f1c3a8b2e",
  "file_id": "4182",
  "kind": "file",
  "link": "https://cloud.example.com/index.php/f/4182",
  "modified_at": "2026-10-28T09:00:00Z",
  "name": "Report.pdf",
  "path": "/Archive/2026/Report.pdf",
  "size": 482113
}
```

### Create folder

Make a folder, and any folders above it that don't exist yet.

**Inputs**

- Path (`path`, text, required): The folder, such as Clients/Acme/2026.

**Outputs**

- `content_type` (text): Its type, such as application/pdf; empty for a folder
- `created` (true/false): False when the folder was already there
- `etag` (text): A tag that changes whenever it does
- `file_id` (text): Nextcloud's number for it
- `kind` (text): file or folder
- `link` (text): A link that opens it in Nextcloud, for people with access
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name
- `path` (text): Its path, such as /Documents/Report.pdf
- `size` (number): Its size in bytes; for a folder, everything in it

**Example output**

```json
{
  "content_type": "",
  "created": true,
  "etag": "6720f1c3a8b2e",
  "file_id": "4182",
  "kind": "folder",
  "link": "https://cloud.example.com/index.php/f/4182",
  "modified_at": "2026-10-28T09:00:00Z",
  "name": "2026",
  "path": "/Clients/Acme/2026",
  "size": 0
}
```

### Create share link

Make a view-only link to a file or folder that anyone with the link can open.

**Inputs**

- Path (`path`, text, required): The file or folder to share, such as Documents/Report.pdf.
- Password (`password`, text): A password the link asks for. Leave blank for none, unless your server requires one.
- Expires (`expire_date`, date): The day the link stops working. Leave blank to keep it, unless your server sets a limit.
- Label (`label`, text): A name for the link, shown in Nextcloud's sharing panel.

**Outputs**

- `expires` (text): The day it stops working (YYYY-MM-DD); empty if never
- `has_password` (true/false): Whether the link needs a password
- `id` (text): The share's number
- `kind` (text): link or person
- `label` (text): The link's label
- `path` (text): What it shares
- `shared_with` (text): For a share with a person, who
- `url` (text): The link; empty for a share with a person

**Example output**

```json
{
  "expires": "2026-12-31",
  "has_password": true,
  "id": "37",
  "kind": "link",
  "label": "For the board",
  "path": "/Documents/Report.pdf",
  "shared_with": "",
  "url": "https://cloud.example.com/s/Hx7KQp2LmNtR4sB"
}
```

### Delete file or folder

Move a file or folder to Nextcloud's trash, where it can be restored.

**Inputs**

- Path (`path`, text, required): The file or folder, such as Inbox/old.txt.

**Outputs**

- `deleted` (true/false): True once deleted
- `path` (text): What was deleted

**Example output**

```json
{
  "deleted": true,
  "path": "/Inbox/old.txt"
}
```

### Get account

Who the connection signs in as, and how much space is used and free.

**Inputs**: None.

**Outputs**

- `email` (text): Its email address
- `free_bytes` (number): Space left, in bytes; 0 when unlimited
- `name` (text): Its display name
- `unlimited` (true/false): True when the account has no space limit
- `used_bytes` (number): Space used, in bytes
- `user_id` (text): The account's user ID

**Example output**

```json
{
  "email": "ada@example.com",
  "free_bytes": 8804682957,
  "name": "Ada Lovelace",
  "unlimited": false,
  "used_bytes": 1932735283,
  "user_id": "ada"
}
```

### Get file info

Look up a file or folder: its size, type, when it last changed and its link.

**Inputs**

- Path (`path`, text, required): The file or folder, such as Documents/Report.pdf.

**Outputs**

- `content_type` (text): Its type, such as application/pdf; empty for a folder
- `etag` (text): A tag that changes whenever it does
- `file_id` (text): Nextcloud's number for it
- `kind` (text): file or folder
- `link` (text): A link that opens it in Nextcloud, for people with access
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name
- `path` (text): Its path, such as /Documents/Report.pdf
- `size` (number): Its size in bytes; for a folder, everything in it

**Example output**

```json
{
  "content_type": "application/pdf",
  "etag": "6720f1c3a8b2e",
  "file_id": "4182",
  "kind": "file",
  "link": "https://cloud.example.com/index.php/f/4182",
  "modified_at": "2026-10-28T09:00:00Z",
  "name": "Report.pdf",
  "path": "/Documents/Report.pdf",
  "size": 482113
}
```

### List folder

List the files and folders in a folder, folders first.

**Inputs**

- Folder (`folder`, text): The folder, such as Documents/Invoices. Leave blank for your top folder.
- How many (`limit`, number): The most to list. Defaults to 50. From 1 to 500.

**Outputs**

- `count` (number): How many
- `folder` (text): The folder listed
- `items` (list): The files and folders

**Example output**

```json
{
  "count": 1,
  "folder": "/Documents",
  "items": [
    {
      "content_type": "application/pdf",
      "etag": "6720f1c3a8b2e",
      "file_id": "4182",
      "kind": "file",
      "link": "https://cloud.example.com/index.php/f/4182",
      "modified_at": "2026-10-28T09:00:00Z",
      "name": "Report.pdf",
      "path": "/Documents/Report.pdf",
      "size": 482113
    }
  ]
}
```

### List shares

List the shares you made, of one file or folder or of all of them.

**Inputs**

- Path (`path`, text): Only shares of this file or folder. Leave blank for all.

**Outputs**

- `count` (number): How many
- `shares` (list): The shares

**Example output**

```json
{
  "count": 1,
  "shares": [
    {
      "expires": "2026-12-31",
      "has_password": true,
      "id": "37",
      "kind": "link",
      "label": "For the board",
      "path": "/Documents/Report.pdf",
      "shared_with": "",
      "url": "https://cloud.example.com/s/Hx7KQp2LmNtR4sB"
    }
  ]
}
```

### Move or rename

Move a file or folder, or give it a new name.

**Inputs**

- From (`source`, text, required): The file or folder, such as Inbox/Report.pdf.
- To (`destination`, text, required): Its new path, name included, such as Archive/2026/Report.pdf.
- Replace (`overwrite`, true/false): Write over anything already at the new path. Off by default. Default: `false`.

**Outputs**

- `content_type` (text): Its type, such as application/pdf; empty for a folder
- `etag` (text): A tag that changes whenever it does
- `file_id` (text): Nextcloud's number for it
- `kind` (text): file or folder
- `link` (text): A link that opens it in Nextcloud, for people with access
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name
- `path` (text): Its path, such as /Documents/Report.pdf
- `size` (number): Its size in bytes; for a folder, everything in it

**Example output**

```json
{
  "content_type": "application/pdf",
  "etag": "6720f1c3a8b2e",
  "file_id": "4182",
  "kind": "file",
  "link": "https://cloud.example.com/index.php/f/4182",
  "modified_at": "2026-10-28T09:00:00Z",
  "name": "Report.pdf",
  "path": "/Archive/2026/Report.pdf",
  "size": 482113
}
```

### Read file

Read a text file, such as a .txt, .csv, .md or .json, from the start.

**Inputs**

- Path (`path`, text, required): The file, such as Notes/todo.md.
- Most characters (`max_chars`, number): Read up to this many characters. Defaults to 30000. From 1 to 100000.

**Outputs**

- `content` (text): What it says
- `path` (text): The file read
- `truncated` (true/false): True when the file goes on past what was read

**Example output**

```json
{
  "content": "- Send the October report",
  "path": "/Notes/todo.md",
  "truncated": false
}
```

### Save text file

Save words as a file, such as a .txt, .csv or .md, making it or writing over it.

**Inputs**

- Path (`path`, text, required): Where to save it, name included, such as Reports/october.csv.
- Content (`content`, text, required): What the file should say.
- Replace (`overwrite`, true/false): Write over a file already there. On by default. Default: `true`.

**Outputs**

- `content_type` (text): Its type, such as application/pdf; empty for a folder
- `etag` (text): A tag that changes whenever it does
- `file_id` (text): Nextcloud's number for it
- `kind` (text): file or folder
- `link` (text): A link that opens it in Nextcloud, for people with access
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name
- `path` (text): Its path, such as /Documents/Report.pdf
- `size` (number): Its size in bytes; for a folder, everything in it

**Example output**

```json
{
  "content_type": "application/pdf",
  "etag": "6720f1c3a8b2e",
  "file_id": "4182",
  "kind": "file",
  "link": "https://cloud.example.com/index.php/f/4182",
  "modified_at": "2026-10-28T09:00:00Z",
  "name": "october.csv",
  "path": "/Reports/october.csv",
  "size": 482113
}
```

### Search files

Find files and folders whose name contains some words, most recently changed first.

**Inputs**

- Name contains (`name`, text, required): Part of the name, such as invoice.
- In folder (`folder`, text): Only look in this folder. Leave blank to look everywhere.
- How many (`limit`, number): The most to list. Defaults to 50. From 1 to 500.

**Outputs**

- `count` (number): How many
- `items` (list): The files and folders

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "content_type": "application/pdf",
      "etag": "6720f1c3a8b2e",
      "file_id": "4182",
      "kind": "file",
      "link": "https://cloud.example.com/index.php/f/4182",
      "modified_at": "2026-10-28T09:00:00Z",
      "name": "Report.pdf",
      "path": "/Documents/Report.pdf",
      "size": 482113
    }
  ]
}
```

### Stop sharing

Stop a share, so its link stops working.

**Inputs**

- Share (`share`, text, required): The share's number, from 'Create share link' or 'List shares'.

**Outputs**

- `deleted` (true/false): True once stopped
- `id` (text): The share's number

**Example output**

```json
{
  "deleted": true,
  "id": "37"
}
```

### Upload file from link

Download a file from a link, such as an invoice PDF, and save it in a folder.

**Inputs**

- Link (`url`, text, required): A link anyone can download the file from, starting with https://.
- Folder (`folder`, text): The folder to save it in. Leave blank for your top folder.
- File name (`file_name`, text): What to call it. Leave blank to use the link's own name.
- Replace (`overwrite`, true/false): Write over a file with the same name. Off by default. Default: `false`.

**Outputs**

- `content_type` (text): Its type, such as application/pdf; empty for a folder
- `etag` (text): A tag that changes whenever it does
- `file_id` (text): Nextcloud's number for it
- `kind` (text): file or folder
- `link` (text): A link that opens it in Nextcloud, for people with access
- `modified_at` (text): When it last changed (ISO 8601)
- `name` (text): Its name
- `path` (text): Its path, such as /Documents/Report.pdf
- `size` (number): Its size in bytes; for a folder, everything in it

**Example output**

```json
{
  "content_type": "application/pdf",
  "etag": "6720f1c3a8b2e",
  "file_id": "4182",
  "kind": "file",
  "link": "https://cloud.example.com/index.php/f/4182",
  "modified_at": "2026-10-28T09:00:00Z",
  "name": "Report.pdf",
  "path": "/Documents/Report.pdf",
  "size": 482113
}
```
