Create Share
nextcloud.create_share
ActionFiles & storageconnection required
Calls the Nextcloud API with the connection's credentials.
Share a file or folder with a user, a group, or as a public link. A public link share returns the url and token to hand out.
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
9 fields, 2 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
path Path inside the account's Nextcloud files, e.g. /Documents/report.pdf. | string | Yes | — | — | /Documents/report.pdf |
share_type Who the share is for; a public link needs no recipient, every other kind names one in share_with. | string | Yes | — | one of "public_link", "user", "group", "email", "federated", "circle", "talk" | public_link |
share_with The recipient: a user id, a group id, an email address or a federated cloud id. Not used for a public link. | string | Conditional | — | only with share_type | — |
permissions Permission bitmask: 1 read, 2 update, 4 create, 8 delete, 16 share — added together (31 is everything). Leave blank for the server's default. | number | No | — | 1–31 | — |
password Password the recipient must enter to open a link or email share. | string | No | — | credential material | credential |
public_upload Let people upload into a shared folder through the link. | boolean | No | false | — | — |
expire_date Expiry date as YYYY-MM-DD; leave blank for no expiry. | string | No | — | matches \d{4}-\d{2}-\d{2} | 2026-01-31 |
note A note shown to the people the share reaches. | string | No | — | — | — |
label A label for the share, shown in the sharing sidebar. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"expire_date": "2026-01-31",
"path": "/Documents/report.pdf",
"public_upload": false,
"share_type": "public_link"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
path The path that was shared. | string | — |
share_type The numeric shareType that was created. | number | — |
id The share id, used by get, update and delete. | string | 42 |
share_type The numeric shareType Nextcloud recorded. | number | — |
uid_owner The account that owns the shared item. | string | — |
share_with The recipient; empty for a public link. | string | — |
path The shared path. | string | /Documents/report.pdf |
item_type 'file' or 'folder'. | string | file |
permissions The permission bitmask on the share. | number | — |
url The public link URL, for a link or email share. | string | — |
token The public link token, for a link or email share. | string | — |
expiration When the share expires, or empty. | string | — |
status Nextcloud's OCS status word. | string | ok |
status_code The OCS meta statuscode: 100 on v1, 200 on v2. | number | — |
message The OCS meta message, when the server set one. | string | — |
total_items Total matching items, when the endpoint reports it. | string | — |
items_per_page Page size, when the endpoint reports it. | string | — |
{
"expiration": "",
"id": "42",
"item_type": "file",
"items_per_page": "",
"message": "",
"path": "/Documents/report.pdf",
"permissions": 0,
"share_type": 0,
"share_with": "",
"status": "ok",
"status_code": 0,
"token": "",
"total_items": "",
"uid_owner": "",
"url": ""
}Notes
- A user, group, federated or circle share needs a share_with; a public link does not.
- Passwords and expiry dates may be forced by the server's sharing policy, which refuses the call rather than silently dropping them.
See Create Share 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.