Search Files

nextcloud.search_files
ActionFiles & storageconnection required

Calls the Nextcloud API with the connection's credentials.

Search the account's files by name using a WebDAV basicsearch. The pattern is matched anywhere in the name unless you write your own % wildcards.

Connection

Required
Yes — the node will not save without one
Auth type
Username & password
Providers
Nextcloud
Secret shape
{"username": "…", "password": "<app password>"}
Config it needs
base_url
Resolved by
config.connection_id, else node.connection_id

Configuration

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

FieldTypeRequiredDefaultConstraintsExample
pattern
Text to look for in file and folder names, e.g. invoice. A SQL LIKE pattern, not a glob or a regex: % is the wildcard.
stringYes———
scope
Folder to search inside, e.g. /Documents. Defaults to the whole account.
stringNo/——
limit
How many matches to return at most.
numberNo50≥ 1—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "limit": 50,
  "scope": "/"
}

Output

One shape.

result

FieldTypeExample
items[].name
The file or folder name.
stringreport.pdf
items[].path
Path relative to the account's files root.
string/Documents/report.pdf
items[].href
The WebDAV href Nextcloud returned for the entry.
string—
items[].is_folder
True when the entry is a folder (a WebDAV collection).
boolean—
items[].size
Size in bytes; for a folder, the total Nextcloud reports.
number—
items[].content_type
The MIME type; empty for a folder.
stringapplication/pdf
items[].last_modified
When the entry last changed, as Nextcloud wrote it.
string—
items[].etag
The entry's ETag, with its quotes stripped.
string—
items[].file_id
The numeric Nextcloud file id (oc:fileid).
string12345
items[].unique_id
The globally unique file id (oc:id).
string—
items[].permissions
Nextcloud's permission letters for this account, e.g. 'RGDNVCK'.
string—
count
How many matches were returned.
number—
scope
The folder that was searched.
string—
pattern
The pattern that was searched for.
string—
{
  "count": 0,
  "items": [
    {
      "content_type": "application/pdf",
      "etag": "",
      "file_id": "12345",
      "href": "",
      "is_folder": false,
      "last_modified": "",
      "name": "report.pdf",
      "path": "/Documents/report.pdf",
      "permissions": "",
      "size": 0,
      "unique_id": ""
    }
  ],
  "pattern": "",
  "scope": ""
}

Notes

  • Nextcloud only searches inside one account, so the scope always starts at the connection's own files root.

See Search Files run in a workflow.

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