n8n-nodes-caldav-pro 2.0.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -131
- package/dist/credentials/CalDavApi.credentials.d.ts +2 -2
- package/dist/credentials/CalDavApi.credentials.js +75 -67
- package/dist/credentials/CalDavApi.credentials.js.map +1 -1
- package/dist/nodes/CalDav/CalDav.node.d.ts +0 -2
- package/dist/nodes/CalDav/CalDav.node.js +181 -523
- package/dist/nodes/CalDav/CalDav.node.js.map +1 -1
- package/dist/nodes/CalDav/CalDav.node.json +18 -0
- package/dist/nodes/CalDav/CalendarDescription.js +4 -2
- package/dist/nodes/CalDav/CalendarDescription.js.map +1 -1
- package/dist/nodes/CalDav/EventDescription.js +197 -200
- package/dist/nodes/CalDav/EventDescription.js.map +1 -1
- package/dist/nodes/CalDav/GenericFunctions.d.ts +36 -121
- package/dist/nodes/CalDav/GenericFunctions.js +283 -943
- package/dist/nodes/CalDav/GenericFunctions.js.map +1 -1
- package/dist/nodes/CalDav/calDav.svg +10 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/index.js +0 -2
- package/package.json +23 -33
- package/LICENSE +0 -21
- package/dist/nodes/CalDav/caldav.svg +0 -10
- package/dist/nodes/CalDav/icons/caldav.svg +0 -10
- package/dist/package.json +0 -75
package/README.md
CHANGED
|
@@ -1,185 +1,183 @@
|
|
|
1
1
|
# n8n-nodes-caldav-pro
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An [n8n](https://n8n.io) community node for **CalDAV** calendars — works with Infomaniak, NextCloud, iCloud, Fastmail, Synology, SOGo, Radicale, and any other RFC 4791-compliant server.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
---
|
|
5
|
+
Usable as an **AI Agent tool** (`usableAsTool: true`) — LLM-friendly parameter descriptions throughout.
|
|
8
6
|
|
|
9
7
|
## Features
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- **Reminders** — VALARM blocks with configurable lead time
|
|
16
|
-
- **All-day events** — full DATE-only support
|
|
17
|
-
- **Zero external dependencies** — pure TypeScript, only `n8n-workflow` as peer dependency
|
|
9
|
+
| Resource | Operations |
|
|
10
|
+
| --------- | ----------------------------------------- |
|
|
11
|
+
| Calendar | Get Many |
|
|
12
|
+
| Event | Create · Get · Get Many · Update · Delete |
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
- HTTP Basic auth with app-password support
|
|
15
|
+
- Robust calendar home-set discovery (4-step fallback chain)
|
|
16
|
+
- Dynamic calendar dropdown via `loadOptionsMethod: getCalendars`
|
|
17
|
+
- Time-range filtered REPORT queries (server-side filter, performant on large calendars)
|
|
18
|
+
- Full iCalendar build/parse via `ical.js` (TZID, RRULE, attendees, all-day)
|
|
19
|
+
- Proper ETag handling on PUT (`If-None-Match: *` on create prevents overwrites)
|
|
20
|
+
- Clear, actionable `NodeApiError` messages
|
|
20
21
|
|
|
21
22
|
## Installation
|
|
22
23
|
|
|
23
|
-
### Community Nodes
|
|
24
|
-
|
|
25
|
-
1. Open n8n → **Settings** → **Community Nodes**
|
|
26
|
-
2. Click **Install a community node**
|
|
27
|
-
3. Enter: `n8n-nodes-caldav-pro`
|
|
28
|
-
4. Click **Install**
|
|
24
|
+
### n8n Community Nodes (recommended)
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
In n8n → **Settings → Community Nodes → Install** enter the package name:
|
|
31
27
|
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
npm install /path/to/n8n-nodes-caldav-pro-2.0.0.tgz
|
|
28
|
+
```
|
|
29
|
+
n8n-nodes-caldav-pro
|
|
35
30
|
```
|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
### Local development / `npm link`
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
```bash
|
|
35
|
+
# Build the node package
|
|
36
|
+
cd n8n-nodes-caldav-pro
|
|
37
|
+
npm install
|
|
38
|
+
npm run build
|
|
39
|
+
npm link
|
|
40
|
+
|
|
41
|
+
# Link it into your n8n custom folder
|
|
42
|
+
mkdir -p ~/.n8n/custom
|
|
43
|
+
cd ~/.n8n/custom
|
|
44
|
+
npm link n8n-nodes-caldav-pro
|
|
45
|
+
|
|
46
|
+
# Restart n8n — the node appears as "CalDAV"
|
|
47
|
+
n8n start
|
|
48
|
+
```
|
|
40
49
|
|
|
41
50
|
## Infomaniak Quickstart
|
|
42
51
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
1. Go to [manager.infomaniak.com](https://manager.infomaniak.com) → **Security** → **App passwords**
|
|
46
|
-
2. Create a new password — label it "n8n CalDAV"
|
|
47
|
-
3. Copy the generated password (you won't see it again)
|
|
48
|
-
|
|
49
|
-
### 2 — Find your short username
|
|
50
|
-
|
|
51
|
-
1. Go to [config.infomaniak.com](https://config.infomaniak.com)
|
|
52
|
-
2. Your CalDAV username is the **short name** shown there — e.g., `DK03456` — **not your email address**
|
|
53
|
-
|
|
54
|
-
### 3 — Set up credentials in n8n
|
|
55
|
-
|
|
56
|
-
1. In n8n, go to **Credentials** → **New** → search for **CalDAV**
|
|
57
|
-
2. Fill in:
|
|
58
|
-
- **Server URL**: `https://sync.infomaniak.com/` (default, no change needed)
|
|
59
|
-
- **Username**: your short name, e.g. `DK03456`
|
|
60
|
-
- **Password**: the App password from step 1
|
|
61
|
-
3. Click **Test** — you should see "Connection successful"
|
|
62
|
-
|
|
63
|
-
### 4 — Create your first event
|
|
52
|
+
> Tested against **Infomaniak Workspace** on `sync.infomaniak.com` — see [Tested with](#tested-with) for the verified run.
|
|
64
53
|
|
|
65
|
-
|
|
66
|
-
2. Set **Resource** → `Event`, **Operation** → `Create`
|
|
67
|
-
3. Pick your calendar from the **Calendar** dropdown
|
|
68
|
-
4. Fill in Title, Start, End — click **Execute**
|
|
54
|
+
### Step 1 — Find your short username
|
|
69
55
|
|
|
70
|
-
|
|
56
|
+
Infomaniak's CalDAV username is **NOT** your email address. Go to
|
|
57
|
+
**https://config.infomaniak.com/** → scroll to *Thunderbird* or *Apple profile*.
|
|
58
|
+
You'll see your short username, e.g. `DK03456` or `abc12345`.
|
|
71
59
|
|
|
72
|
-
|
|
60
|
+
> *(Screenshot placeholder: `config.infomaniak.com` page showing the short username.)*
|
|
73
61
|
|
|
74
|
-
|
|
62
|
+
### Step 2 — Generate an app password (only if 2FA is enabled)
|
|
75
63
|
|
|
76
|
-
|
|
64
|
+
If you have 2FA enabled on your Infomaniak account, regular login passwords are
|
|
65
|
+
rejected for CalDAV. Create an app password:
|
|
66
|
+
**https://manager.infomaniak.com** → top-right avatar → **Account management** →
|
|
67
|
+
**Security** → **Application passwords** → *Generate new*.
|
|
68
|
+
Give it a descriptive name like `n8n-caldav`.
|
|
77
69
|
|
|
78
|
-
|
|
79
|
-
2. In the agent's **Tools** section, add the **CalDAV** node
|
|
80
|
-
3. The agent will automatically discover all available operations and parameters
|
|
70
|
+
### Step 3 — Create the credential in n8n
|
|
81
71
|
|
|
82
|
-
|
|
72
|
+
1. In n8n, add a **CalDAV API** credential.
|
|
73
|
+
2. **Server URL**: `https://sync.infomaniak.com/`
|
|
74
|
+
3. **Username**: your short username from Step 1 (e.g. `DK03456`) — **not the email**.
|
|
75
|
+
4. **Password**: the app password from Step 2 (or your regular password if 2FA is off).
|
|
76
|
+
5. Click **Test**. A 207 Multi-Status confirms it works.
|
|
83
77
|
|
|
84
|
-
|
|
85
|
-
You are a scheduling assistant. You have access to a CalDAV calendar tool.
|
|
78
|
+
### Step 4 — Your first event
|
|
86
79
|
|
|
87
|
-
|
|
80
|
+
1. Drop a **CalDAV** node on the canvas.
|
|
81
|
+
2. Select **Resource** = `Event`, **Operation** = `Create`.
|
|
82
|
+
3. Pick a calendar from the dropdown (loads dynamically via discovery).
|
|
83
|
+
4. Fill **Summary**, **Start**, **End** — leave everything else default.
|
|
84
|
+
5. Execute the node. You'll get back `{ uid, url, etag, ... }`.
|
|
85
|
+
6. Verify in your calendar app (Thunderbird, Apple Calendar, or https://calendar.infomaniak.com/).
|
|
88
86
|
|
|
89
|
-
|
|
90
|
-
- Always confirm event details (title, date/time, calendar) before creating
|
|
91
|
-
- When listing events, default to the next 7 days unless the user specifies otherwise
|
|
92
|
-
- For recurring events, confirm the frequency and end condition
|
|
93
|
-
- Times should be provided in ISO 8601 format with timezone offset, e.g. 2026-04-20T14:00:00+02:00
|
|
94
|
-
- If the user doesn't specify a calendar, use the first available calendar
|
|
87
|
+
### FAQ — Infomaniak specifics
|
|
95
88
|
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
**1. "401 Unauthorized"**
|
|
90
|
+
The Username field contains your email address. Use the short username from
|
|
91
|
+
https://config.infomaniak.com/ (format: letters + digits, e.g. `DK03456`).
|
|
98
92
|
|
|
99
|
-
|
|
93
|
+
**2. "No calendars found"**
|
|
94
|
+
Your Server URL is wrong or has a typo. Must be exactly `https://sync.infomaniak.com/`
|
|
95
|
+
with trailing slash, scheme `https://`.
|
|
100
96
|
|
|
101
|
-
|
|
97
|
+
**3. "2FA blocks login"**
|
|
98
|
+
Regular passwords are refused when 2FA is active. Create an app password at
|
|
99
|
+
https://manager.infomaniak.com → Security → Application passwords.
|
|
102
100
|
|
|
103
|
-
|
|
104
|
-
|---|---|
|
|
105
|
-
| `eventTitle` | `event_title`, `EVENT_TITLE` |
|
|
106
|
-
| `startDateAndTime` | `start_date_and_time`, `START_DATE_AND_TIME` |
|
|
107
|
-
| `calendarUrl` | `calendar_url`, `CALENDAR_URL` |
|
|
108
|
-
| `recurringEvent` | `recurring_event` |
|
|
101
|
+
## AI Agent Usage
|
|
109
102
|
|
|
110
|
-
|
|
103
|
+
This node is declared `usableAsTool: true`, and every parameter has an LLM-readable
|
|
104
|
+
description. An AI Agent can call it directly. Example prompt:
|
|
111
105
|
|
|
112
|
-
|
|
106
|
+
> *"Create a calendar event in my primary calendar for tomorrow at 14:00 Berlin
|
|
107
|
+
> time. Title: 'Kickoff with customer'. Duration: 1 hour. Location: 'Zoom — link
|
|
108
|
+
> in the invite'. Invite alice@example.com and bob@example.com."*
|
|
113
109
|
|
|
114
|
-
|
|
110
|
+
The agent will populate:
|
|
115
111
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
- `resource` = `event`, `operation` = `create`
|
|
113
|
+
- `calendar` = picked from the dropdown via `getCalendars`
|
|
114
|
+
- `summary` = `"Kickoff with customer"`
|
|
115
|
+
- `start` = `"2026-04-21T14:00:00+02:00"`
|
|
116
|
+
- `end` = `"2026-04-21T15:00:00+02:00"`
|
|
117
|
+
- `additionalFields.location` = `"Zoom — link in the invite"`
|
|
118
|
+
- `additionalFields.attendees` = two attendee objects with emails
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
Retrieval example:
|
|
121
121
|
|
|
122
|
-
|
|
123
|
-
|---|---|
|
|
124
|
-
| Create | Create a new calendar event |
|
|
125
|
-
| Get | Retrieve a single event by UID |
|
|
126
|
-
| Get All | List events within a date range |
|
|
127
|
-
| Update | Modify an existing event |
|
|
128
|
-
| Delete | Remove an event |
|
|
122
|
+
> *"What meetings do I have this week?"*
|
|
129
123
|
|
|
130
|
-
|
|
124
|
+
The agent calls `Event > Get Many` with `timeMin` = start of today and
|
|
125
|
+
`timeMax` = start of today + 7 days.
|
|
131
126
|
|
|
132
|
-
|
|
133
|
-
|---|---|---|
|
|
134
|
-
| Calendar | All event ops | Dynamic dropdown, auto-populated |
|
|
135
|
-
| UID | Get, Update, Delete (required) | Unique event identifier |
|
|
136
|
-
| Title | Create (required) | Event summary/title |
|
|
137
|
-
| Start Date & Time | Create (required) | ISO 8601, e.g. `2026-04-20T14:00:00+02:00` |
|
|
138
|
-
| End Date & Time | Create | Defaults to 1 hour after start |
|
|
139
|
-
| Location | Create, Update | Free text |
|
|
140
|
-
| Description | Create, Update | Free text |
|
|
141
|
-
| All Day Event | Create, Update | Toggle — uses DATE values |
|
|
142
|
-
| Reminder (minutes before) | Create, Update | 0 = at event time |
|
|
143
|
-
| Recurring Event | Create, Update | Toggle to enable recurrence |
|
|
144
|
-
| Recurrence Frequency | Create (recurring) | DAILY / WEEKLY / MONTHLY / YEARLY |
|
|
145
|
-
| Recurrence Interval | Create (recurring) | e.g. 2 = every 2 weeks |
|
|
146
|
-
| Recurrence Days | Create (WEEKLY) | MO, TU, WE, TH, FR, SA, SU |
|
|
147
|
-
| Recurrence End Type | Create (recurring) | Never / After N occurrences / Until date |
|
|
148
|
-
| Time Min / Max | Get All | Filter window (defaults: today / +30 days) |
|
|
149
|
-
| Return All | Get All | If off, capped by Max Results |
|
|
150
|
-
| Max Results | Get All | Default 50 |
|
|
127
|
+
## Tested with
|
|
151
128
|
|
|
152
|
-
|
|
129
|
+
| Provider | Status | Notes |
|
|
130
|
+
| -------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
|
+
| **Infomaniak Workspace** | ✅ Verified | End-to-end test passed on 2026-04-20 against account `DK03456`. All 7 steps green (auth → discovery → list → create → report → delete → verify). |
|
|
132
|
+
| NextCloud | 🟡 Expected | SabreDAV-based, same backend as Infomaniak. Base URL typically `https://<host>/remote.php/dav/`. |
|
|
133
|
+
| iCloud | 🟡 Expected | Requires app-specific password. Base URL `https://caldav.icloud.com/`. |
|
|
134
|
+
| Fastmail | 🟡 Expected | App password required. Base URL `https://caldav.fastmail.com/dav/`. |
|
|
135
|
+
| Synology Calendar | 🟡 Expected | Base URL `https://<nas-host>:5006/caldav.php/`. |
|
|
153
136
|
|
|
154
|
-
|
|
137
|
+
### Verified E2E run (Infomaniak Workspace)
|
|
155
138
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
139
|
+
```
|
|
140
|
+
═══ CalDAV E2E Test against Infomaniak ═══
|
|
141
|
+
Server: https://sync.infomaniak.com/
|
|
142
|
+
User: DK03456
|
|
143
|
+
|
|
144
|
+
[1] Authenticating (PROPFIND /) → 207 ✓
|
|
145
|
+
[2] Discover calendar-home-set → /calendars/DK03456/
|
|
146
|
+
[3] Calendar > Get All → 5 calendars
|
|
147
|
+
[4] Event > Create "addPV Node Test" → PUT 201, ETag set
|
|
148
|
+
[5] Event > Get All for today → event present
|
|
149
|
+
[6] Event > Delete → 204 ✓
|
|
150
|
+
[7] Event > Get All again → event gone ✓
|
|
151
|
+
|
|
152
|
+
═══ ALL TESTS PASSED ═══
|
|
153
|
+
```
|
|
161
154
|
|
|
162
|
-
|
|
155
|
+
Tested against: **Infomaniak Workspace (my kSuite / Workspace)** — 2026-04-20.
|
|
163
156
|
|
|
164
|
-
|
|
157
|
+
## Known limitations / TODOs
|
|
165
158
|
|
|
166
|
-
|
|
159
|
+
1. **No OAuth2** — only HTTP Basic. Infomaniak/NextCloud don't require it; if you need OAuth2 (Google, Nylas bridge) this node is not the right fit.
|
|
160
|
+
2. **No Free/Busy** (`calendar-availability`) — only the basic `calendar-query`. Easy to add if someone needs it.
|
|
161
|
+
3. **No attachments** (VEVENT ATTACH property) — can be added via iCal builder extension.
|
|
162
|
+
4. **No scheduling RSVP** — attendees are written as ATTENDEE lines but no METHOD:REQUEST / invitation email is sent by the server.
|
|
163
|
+
5. **No multi-calendar search** — Get Many queries one calendar at a time. For a cross-calendar view, loop in a workflow.
|
|
167
164
|
|
|
168
|
-
|
|
169
|
-
- **Nextcloud** (self-hosted)
|
|
170
|
-
- **Radicale** (self-hosted)
|
|
165
|
+
## Development
|
|
171
166
|
|
|
172
|
-
|
|
167
|
+
```bash
|
|
168
|
+
npm run dev # tsc --watch
|
|
169
|
+
npm run build # tsc + gulp build:icons
|
|
170
|
+
npm run lint # eslint
|
|
171
|
+
npm run format # prettier
|
|
172
|
+
```
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
### Running the E2E test
|
|
175
175
|
|
|
176
|
-
|
|
177
|
-
- **Recurring event updates** modify the master event (all occurrences), not individual instances (RECURRENCE-ID is not yet supported)
|
|
178
|
-
- **Attendees / RSVP** are not yet supported
|
|
179
|
-
- **Free/busy queries** are not yet supported
|
|
180
|
-
- The node queries calendar data by time range; very large calendars (10 000+ events) may be slow on Get All
|
|
176
|
+
Edit `e2e-test.js` with your Infomaniak username/password and run:
|
|
181
177
|
|
|
182
|
-
|
|
178
|
+
```bash
|
|
179
|
+
node e2e-test.js
|
|
180
|
+
```
|
|
183
181
|
|
|
184
182
|
## License
|
|
185
183
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ICredentialDataDecryptedObject, ICredentialTestRequest, ICredentialType, IHttpRequestOptions, INodeProperties } from 'n8n-workflow';
|
|
2
2
|
export declare class CalDavApi implements ICredentialType {
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
5
5
|
documentationUrl: string;
|
|
6
6
|
properties: INodeProperties[];
|
|
7
|
-
authenticate:
|
|
7
|
+
authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
8
8
|
test: ICredentialTestRequest;
|
|
9
9
|
}
|
|
@@ -2,81 +2,89 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalDavApi = void 0;
|
|
4
4
|
class CalDavApi {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
5
|
+
name = 'calDavApi';
|
|
6
|
+
displayName = 'CalDAV API';
|
|
7
|
+
documentationUrl = 'https://github.com/daisytwo/n8n-nodes-caldav-pro';
|
|
8
|
+
properties = [
|
|
9
|
+
{
|
|
10
|
+
displayName: 'Server URL',
|
|
11
|
+
name: 'serverUrl',
|
|
12
|
+
type: 'string',
|
|
13
|
+
default: 'https://sync.infomaniak.com/',
|
|
14
|
+
placeholder: 'https://sync.infomaniak.com/',
|
|
15
|
+
description: 'Base URL of the CalDAV server. For Infomaniak use https://sync.infomaniak.com/. For NextCloud use https://<host>/remote.php/dav/. Must end with a slash.',
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Username',
|
|
20
|
+
name: 'username',
|
|
21
|
+
type: 'string',
|
|
22
|
+
default: '',
|
|
23
|
+
placeholder: 'abc12345',
|
|
24
|
+
description: 'IMPORTANT for Infomaniak: the SHORT username (e.g. "DK03456"), NOT your email address. Find it at https://config.infomaniak.com/ under Thunderbird or Apple profile. Using the email address is the #1 cause of "401 Unauthorized" errors.',
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Password',
|
|
29
|
+
name: 'password',
|
|
30
|
+
type: 'string',
|
|
31
|
+
typeOptions: { password: true },
|
|
32
|
+
default: '',
|
|
33
|
+
description: 'Your CalDAV password. If 2FA is enabled on your account (Infomaniak, iCloud, Google), you MUST generate an app-specific password at the provider manager. Regular login passwords will be rejected.',
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
async authenticate(credentials, requestOptions) {
|
|
38
|
+
const username = credentials.username;
|
|
39
|
+
const password = credentials.password;
|
|
40
|
+
const token = Buffer.from(`${username}:${password}`).toString('base64');
|
|
41
|
+
requestOptions.headers = {
|
|
42
|
+
...(requestOptions.headers ?? {}),
|
|
43
|
+
Authorization: `Basic ${token}`,
|
|
44
|
+
};
|
|
45
|
+
return requestOptions;
|
|
46
|
+
}
|
|
47
|
+
test = {
|
|
48
|
+
request: {
|
|
49
|
+
method: 'PROPFIND',
|
|
50
|
+
url: '={{$credentials.serverUrl.replace(/\\/$/, "")}}/',
|
|
51
|
+
headers: {
|
|
52
|
+
Depth: '0',
|
|
53
|
+
'Content-Type': 'application/xml; charset=utf-8',
|
|
35
54
|
},
|
|
55
|
+
body: `<?xml version="1.0" encoding="utf-8"?>
|
|
56
|
+
<d:propfind xmlns:d="DAV:" xmlns:c="urn:ietf:params:xml:ns:caldav">
|
|
57
|
+
<d:prop>
|
|
58
|
+
<d:current-user-principal/>
|
|
59
|
+
<c:calendar-home-set/>
|
|
60
|
+
<d:displayname/>
|
|
61
|
+
</d:prop>
|
|
62
|
+
</d:propfind>`,
|
|
63
|
+
},
|
|
64
|
+
rules: [
|
|
36
65
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
password: true,
|
|
66
|
+
type: 'responseCode',
|
|
67
|
+
properties: {
|
|
68
|
+
value: 401,
|
|
69
|
+
message: '401 Unauthorized: Username or app password wrong. For Infomaniak the username is NOT the email address — see https://config.infomaniak.com/ for the correct short username (e.g. "abc12345").',
|
|
42
70
|
},
|
|
43
|
-
default: '',
|
|
44
|
-
required: true,
|
|
45
|
-
description: 'Account password or app-specific password. ' +
|
|
46
|
-
'If 2FA is enabled on your Infomaniak account, you must create an app password at ' +
|
|
47
|
-
'https://manager.infomaniak.com → Security → Application passwords. ' +
|
|
48
|
-
'Using your main password with 2FA enabled will return HTTP 401.',
|
|
49
71
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
username: '={{ $credentials.username }}',
|
|
56
|
-
password: '={{ $credentials.password }}',
|
|
57
|
-
},
|
|
58
|
-
headers: {
|
|
59
|
-
'User-Agent': 'n8n-nodes-caldav-pro/2.0.0',
|
|
72
|
+
{
|
|
73
|
+
type: 'responseCode',
|
|
74
|
+
properties: {
|
|
75
|
+
value: 404,
|
|
76
|
+
message: '404 Not Found: the username path does not exist on this server. Check the username spelling (Infomaniak format is "abc12345").',
|
|
60
77
|
},
|
|
61
78
|
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
method: 'PROPFIND',
|
|
68
|
-
headers: {
|
|
69
|
-
Depth: '0',
|
|
70
|
-
'Content-Type': 'application/xml; charset=utf-8',
|
|
79
|
+
{
|
|
80
|
+
type: 'responseCode',
|
|
81
|
+
properties: {
|
|
82
|
+
value: 403,
|
|
83
|
+
message: '403 Forbidden: authentication succeeded but access to the principal is denied. Check account permissions.',
|
|
71
84
|
},
|
|
72
|
-
body: '<?xml version="1.0" encoding="utf-8" ?>' +
|
|
73
|
-
'<d:propfind xmlns:d="DAV:">' +
|
|
74
|
-
'<d:prop><d:resourcetype/><d:displayname/></d:prop>' +
|
|
75
|
-
'</d:propfind>',
|
|
76
|
-
ignoreHttpStatusErrors: true,
|
|
77
85
|
},
|
|
78
|
-
|
|
79
|
-
}
|
|
86
|
+
],
|
|
87
|
+
};
|
|
80
88
|
}
|
|
81
89
|
exports.CalDavApi = CalDavApi;
|
|
82
90
|
//# sourceMappingURL=CalDavApi.credentials.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalDavApi.credentials.js","sourceRoot":"","sources":["../../credentials/CalDavApi.credentials.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"CalDavApi.credentials.js","sourceRoot":"","sources":["../../credentials/CalDavApi.credentials.ts"],"names":[],"mappings":";;;AAQA,MAAa,SAAS;IACrB,IAAI,GAAG,WAAW,CAAC;IAEnB,WAAW,GAAG,YAAY,CAAC;IAE3B,gBAAgB,GAAG,kDAAkD,CAAC;IAEtE,UAAU,GAAsB;QAC/B;YACC,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,8BAA8B;YACvC,WAAW,EAAE,8BAA8B;YAC3C,WAAW,EACV,0JAA0J;YAC3J,QAAQ,EAAE,IAAI;SACd;QACD;YACC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,UAAU;YACvB,WAAW,EACV,4OAA4O;YAC7O,QAAQ,EAAE,IAAI;SACd;QACD;YACC,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC/B,OAAO,EAAE,EAAE;YACX,WAAW,EACV,qMAAqM;YACtM,QAAQ,EAAE,IAAI;SACd;KACD,CAAC;IAMF,KAAK,CAAC,YAAY,CACjB,WAA2C,EAC3C,cAAmC;QAEnC,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAkB,CAAC;QAChD,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAkB,CAAC;QAChD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,IAAI,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACxE,cAAc,CAAC,OAAO,GAAG;YACxB,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,EAAE,CAAC;YACjC,aAAa,EAAE,SAAS,KAAK,EAAE;SAC/B,CAAC;QACF,OAAO,cAAc,CAAC;IACvB,CAAC;IAOD,IAAI,GAA2B;QAC9B,OAAO,EAAE;YACR,MAAM,EAAE,UAAiB;YACzB,GAAG,EAAE,kDAAkD;YACvD,OAAO,EAAE;gBACR,KAAK,EAAE,GAAG;gBACV,cAAc,EAAE,gCAAgC;aAChD;YACD,IAAI,EAAE;;;;;;;cAOK;SACX;QACD,KAAK,EAAE;YACN;gBACC,IAAI,EAAE,cAAc;gBACpB,UAAU,EAAE;oBACX,KAAK,EAAE,GAAG;oBACV,OAAO,EACN,+LAA+L;iBAChM;aACD;YACD;gBACC,IAAI,EAAE,cAAc;gBACpB,UAAU,EAAE;oBACX,KAAK,EAAE,GAAG;oBACV,OAAO,EACN,gIAAgI;iBACjI;aACD;YACD;gBACC,IAAI,EAAE,cAAc;gBACpB,UAAU,EAAE;oBACX,KAAK,EAAE,GAAG;oBACV,OAAO,EACN,2GAA2G;iBAC5G;aACD;SACD;KACD,CAAC;CACF;AA3GD,8BA2GC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
-
import { generateUid } from './GenericFunctions';
|
|
3
2
|
export declare class CalDav implements INodeType {
|
|
4
3
|
description: INodeTypeDescription;
|
|
5
4
|
methods: {
|
|
@@ -9,4 +8,3 @@ export declare class CalDav implements INodeType {
|
|
|
9
8
|
};
|
|
10
9
|
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
11
10
|
}
|
|
12
|
-
export { generateUid };
|