npm package: @hblackfox/n8n-nodes-webdav
Description: n8n nodes for CalDAV and CardDAV (WebDAV) operations with custom HTTP methods (REPORT, PROPFIND)
Author: Kodixar
Latest version: 1.0.0

# n8n-nodes-webdav

Custom n8n nodes for **CalDAV** and **CardDAV** (WebDAV) operations.

These nodes support custom HTTP methods (REPORT, PROPFIND) that are not available in the standard n8n HTTP Request node.

## Features

### CalDAV Node
- **Query Events** - REPORT method to query calendar events by date range
- **Create Event** - PUT method to create iCalendar events
- **Get Event** - GET method to retrieve a specific event
- **Delete Event** - DELETE method to remove an event

### CardDAV Node
- **List Contacts** - PROPFIND method to list all contacts
- **Search Contact** - Search contacts by email or phone
- **Create Contact** - PUT method to create vCard contacts
- **Get Contact** - GET method to retrieve a specific contact
- **Delete Contact** - DELETE method to remove a contact

## Installation

### Option 1: Install from npm (when published)

```bash
npm install n8n-nodes-webdav
```

### Option 2: Install from local folder

1. Build the package:
```bash
cd n8n-nodes-webdav
npm install
npm run build
```

2. Copy to n8n custom nodes folder:
```bash
# Linux/Mac
mkdir -p ~/.n8n/custom
cp -r dist/* ~/.n8n/custom/

# Or link for development
npm link
cd ~/.n8n
npm link n8n-nodes-webdav
```

3. Restart n8n

### Option 3: Docker installation

Add to your Dockerfile:
```dockerfile
FROM n8nio/n8n:latest

# Copy custom nodes
COPY n8n-nodes-webdav /home/node/.n8n/custom/n8n-nodes-webdav
WORKDIR /home/node/.n8n/custom/n8n-nodes-webdav
RUN npm install && npm run build
```

Or mount as volume in docker-compose:
```yaml
services:
  n8n:
    volumes:
      - ./n8n-nodes-webdav:/home/node/.n8n/custom/n8n-nodes-webdav
```

## Configuration

### Credentials

Create a **WebDAV API** credential in n8n with:
- **Base URL**: Your WebDAV server URL (e.g., `https://mail.example.com/SOGo/dav/user@example.com/`)
- **Username**: Your WebDAV username
- **Password**: Your WebDAV password

### Example: SOGo Server

For SOGo servers:
- Base URL: `https://mail.blockhat.io/SOGo/dav/contact@boukri.me/`
- Calendar Path: `Calendar/personal/`
- Contacts Path: `Contacts/personal/`

## Usage Examples

### Query Calendar Events

1. Add a **CalDAV** node
2. Select **Query Events** operation
3. Set **Calendar Path**: `Calendar/personal/`
4. Set **Start Date**: `2026-01-20`
5. Set **End Date**: `2026-01-27`

Output:
```json
{
  "success": true,
  "events": [
    {
      "uid": "event-123",
      "summary": "Meeting",
      "start": "2026-01-21T10:00:00",
      "end": "2026-01-21T11:00:00"
    }
  ]
}
```

### Create a Contact

1. Add a **CardDAV** node
2. Select **Create Contact** operation
3. Set **Contacts Path**: `Contacts/personal/`
4. Set **Full Name**: `John Doe`
5. Set **Email**: `john@example.com`
6. Set **Phone**: `+33612345678`

Output:
```json
{
  "success": true,
  "contactUid": "contact-1706123456789-abc12",
  "contact": {
    "fullName": "John Doe",
    "email": "john@example.com",
    "phone": "+33612345678"
  }
}
```

## Compatibility

- **n8n**: v1.0.0+
- **Node.js**: 18+
- **Tested with**: SOGo, Nextcloud, Radicale, Baikal

## Why Custom Nodes?

The standard n8n HTTP Request node only supports these methods:
- DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT

CalDAV and CardDAV require:
- **REPORT** - For querying calendar events with time-range filters
- **PROPFIND** - For listing contacts with full vCard data

Custom nodes have access to `this.helpers.httpRequest()` which supports any HTTP method.

## License

MIT

## Author

Kodixar - [https://kodixar.fr](https://kodixar.fr)