Licensed to be used in conjunction with basebox, only.
// integration
Nextcloud
Applies to
Product: Cloud · Server · Audience: Administrator
The Nextcloud connector lets the basebox assistant work with the files in your Nextcloud: search, read, write, move, tag and comment on them, use versions and the trash bin, and create and change shares. Each person signs in with an app password they create in Nextcloud.
What does the connector do?
This and the following sections are generated from the information the connector's image carries. What applies to every connector is described under What applies to every connector.
In the catalog it describes itself as:
Files, calendars, contacts and notes on your Nextcloud server.
It gives the assistant these instructions:
Nextcloud, seen with the user's own account: absent results can mean 'not permitted' as well as 'not there', or that the app is not installed. File paths are relative to the user's files; browse with nc_webdav_list_directory or find by name with nc_webdav_search_files, then read with nc_webdav_read_file. Calendars and address books are named as their list tools report them. Pass the etag you read to an update so another change is not overwritten. Ask before overwriting or deleting anything.
Settings
The administrator fills in these fields in the connector's settings. They apply to the whole organisation.
| Field | Required | Meaning |
|---|---|---|
| Nextcloud URL | yes | The web address of your Nextcloud, including a sub-path such as /nextcloud if it has one. Example: https://cloud.example.org |
| Help links for signing in | no | A page on your intranet explaining how to create an app password. |
Sign-in
The administrator decides how the connector signs in: with Personal sign-in each person signs in with their own account and sees only what they may. With Company account everyone uses one account the administrator enters.
Personal sign-in
- Username and app password – asks for a username and password. In Nextcloud, open Settings → Security → Devices & sessions, enter "basebox" as the app name and click "Create new app password". Copy the Login and Password shown there into the fields below — the password is shown only once.
Company account
- App password – asks for a username and password.
A company account gives everyone the same rights
Every basebox user reaches the system with the rights of this one account. Results are not trimmed to what each person may see.
The connector adds:
Every basebox user reaches Nextcloud as this account and sees every file shared with it. Share only what everyone may see.
Tools
The assistant can call 28 tools.
| Tool | Effect | Description |
|---|---|---|
nc_share_create |
writes | Shares a file or folder of the user's Nextcloud with a user, group, email address, federated user, circle, Talk conversation or Deck card, read-only unless more rights are given, and returns the share with its id. |
nc_share_create_public_link |
writes | Creates a read-only public link to a file or folder of the user's Nextcloud that anyone with the URL can open until it expires (30 minutes by default); appending /download to its url downloads the file directly. |
nc_share_delete |
modifies or deletes | Ends a Nextcloud share or public link the user created, by its id; the recipients lose access. |
nc_share_get |
reads | Reads one Nextcloud share by its id: what is shared, with whom, with which rights and until when. |
nc_share_list |
reads | Lists the shares the user created in Nextcloud, or those others shared with the user, optionally of one file or folder only. |
nc_share_update |
modifies or deletes | Changes the rights a Nextcloud share the user created grants, and returns the share as stored. |
nc_webdav_copy_resource |
modifies or deletes | Copies a file, or a folder with everything in it, within the user's Nextcloud files. An existing destination is only replaced with overwrite true, optionally only if it is still the version with a given etag. |
nc_webdav_create_comment |
writes | Posts a comment on a file or folder in the user's Nextcloud files, visible to everyone the file is shared with. Mentioning @userid notifies that user. |
nc_webdav_create_directory |
writes | Creates a folder in the user's Nextcloud files. Its parent folder must exist. |
nc_webdav_delete_resource |
modifies or deletes | Deletes a file, or a folder with everything in it, from the user's Nextcloud files. It goes to the user's trash, from which nc_webdav_restore_from_trash can restore it. |
nc_webdav_find_by_name |
reads | Finds files and folders in the user's Nextcloud files whose name matches a pattern, case-insensitive, in all folders or below one. Searches names only, not file contents. |
nc_webdav_find_by_tag_name |
reads | Finds the files and folders in the user's Nextcloud files that carry a system tag, given the tag's exact name. |
nc_webdav_find_by_type |
reads | Finds files of a MIME type in the user's Nextcloud files, e.g. all PDFs or with image/% all images, in all folders or below one. |
nc_webdav_get_file_tags |
reads | Lists the system tags assigned to one file or folder in the user's Nextcloud files. |
nc_webdav_list_comments |
reads | Lists the comments people left on a file or folder in the user's Nextcloud files, newest first, with author, time and mentions. |
nc_webdav_list_directory |
reads | Lists the files and folders directly inside one folder of the user's Nextcloud files, with their type, size, modification time and etag. Each entry's path can be passed on to list a subfolder or read a file. |
nc_webdav_list_favorites |
reads | Lists the files and folders the user marked as favourites in Nextcloud, in all folders or below one. |
nc_webdav_list_tags |
reads | Lists the system tags of the Nextcloud instance, with their ids and whether users can see and assign them. |
nc_webdav_list_trash |
reads | Lists the files and folders in the user's Nextcloud trash, with their original location, deletion time and the id that restores them. |
nc_webdav_list_versions |
reads | Lists the stored earlier versions of a file in the user's Nextcloud files, with size, modification time and the version_id that restores them. |
nc_webdav_move_resource |
modifies or deletes | Moves or renames a file or folder in the user's Nextcloud files. An existing destination is only replaced with overwrite true, optionally only if it is still the version with a given etag. |
nc_webdav_read_file |
reads | Reads the text of one file in the user's Nextcloud files: plain text as it is, Office documents and PDFs converted to text, scanned documents through OCR where available. Files over 8 MB are not read. The result says whether the text was truncated, and carries the file's etag for a later conditional write. |
nc_webdav_restore_from_trash |
writes | Restores a file or folder from the user's Nextcloud trash to the location it was deleted from. |
nc_webdav_restore_version |
writes | Rolls a file in the user's Nextcloud files back to an earlier version. The current content is kept as a version in turn, so the rollback can be undone. |
nc_webdav_search_files |
reads | Searches the user's Nextcloud files and folders, in all folders or below one, combining a name pattern, a MIME type pattern and favourite status; with no filter it returns the most recently modified files. Searches names only, not file contents. |
nc_webdav_tag_file |
writes | Assigns a system tag to a file or folder in the user's Nextcloud files, creating the tag if none has that name yet. Tags are visible to everyone who can see the file. |
nc_webdav_untag_file |
writes | Removes a system tag from a file or folder in the user's Nextcloud files; the tag itself keeps existing. |
nc_webdav_write_file |
modifies or deletes | Writes text to a file in the user's Nextcloud files. By default it only creates a new file; an existing file is replaced only with if_match set to the etag it was read with (or * for any version), or with overwrite true. Returns the new etag. |
Generated from mcp-nextcloud:v0.3.1.