CardDAV icon

CardDAV

Interact with CardDAV servers for address book operations

Overview

This node integrates with CardDAV servers to manage address book contacts. Specifically, the "Create Contact" operation allows users to add a new contact to a specified address book on a CardDAV server by uploading vCard data.

Common scenarios include:

  • Automating contact creation in corporate or personal address books hosted on CardDAV-compatible servers.
  • Syncing contacts from other systems into a centralized CardDAV address book.
  • Bulk importing contacts by feeding vCard data programmatically.

Example: You have a CRM system exporting contacts as vCards and want to automatically add them to your CardDAV address book for unified access across devices.

Properties

Name Meaning
Address Book Path Server-relative path to the address book where the contact will be created. Must start with "/". Spaces and special characters are auto-encoded. Example: /addressbooks/user/contacts/
Contact ID Unique identifier for the contact. This will be used as the filename (with .vcf extension) on the server. Example: contact-123
Contact Data (vCard) The contact information formatted as a vCard string (.vcf). This is the actual contact data to upload.

Output

The node outputs a JSON object with the following fields:

  • success: Boolean indicating if the contact creation was successful (HTTP status code 2xx).
  • statusCode: HTTP status code returned by the CardDAV server.
  • contactId: The unique identifier of the created contact (same as input).
  • addressBookPath: The normalized and encoded address book path where the contact was created.

No binary data output is produced by this operation.

Dependencies

  • Requires connection to a CardDAV server with valid credentials including a base URL starting with http:// or https://.
  • An API key or authentication token credential must be configured in n8n to authorize requests to the CardDAV server.
  • The server must support HTTP PUT requests to create contacts at the specified address book path.

Troubleshooting

  • Invalid Base URL: If the base URL in credentials is missing protocol or malformed, the node throws an error. Ensure the URL starts with http:// or https://.
  • Absolute URLs in paths: Paths must be server-relative starting with /. Absolute URLs in path parameters cause errors.
  • Connection errors: Errors like host not found, connection refused, or timeout indicate network or server accessibility issues.
  • HTTP errors: Non-2xx responses from the server will result in failure. Check server logs and permissions.
  • Encoding issues: Special characters in paths are auto-encoded; ensure input paths are correct and do not contain absolute URLs.

Links and References


This summary covers the static analysis of the "Create Contact" operation within the CardDAV node implementation based on provided source code and property definitions.

Discussion