diff --git a/packages/nodes-base/nodes/NextCloud/GenericFunctions.ts b/packages/nodes-base/nodes/NextCloud/GenericFunctions.ts index 74bd134df0..3f5ca72b80 100644 --- a/packages/nodes-base/nodes/NextCloud/GenericFunctions.ts +++ b/packages/nodes-base/nodes/NextCloud/GenericFunctions.ts @@ -45,6 +45,13 @@ export async function nextCloudApiRequest(this: IHookFunctions | IExecuteFunctio }; options.uri = `${credentials.webDavUrl}/${encodeURI(endpoint)}`; + + const resource = this.getNodeParameter('resource', 0); + const operation = this.getNodeParameter('operation', 0); + + if (resource === 'user' && operation === 'add') { + options.uri = options.uri.replace('/remote.php/webdav', ''); + } console.log(options); return await this.helpers.request(options); } else {