CardDAV icon

CardDAV

Interact with CardDAV servers for address book operations

Overview

This node integrates with CardDAV servers to manage address book data, specifically contacts. It supports operations such as creating, updating, deleting, and retrieving contacts from a specified address book on the server.

The Create Contact operation allows users to add a new contact to an existing address book by providing the path to the address book, a unique contact identifier, and the contact details formatted as a vCard (.vcf). This is useful in scenarios where automated contact management is needed, such as syncing contacts from other systems, bulk importing contacts, or integrating contact creation into workflows.

Example use case: Automatically adding new customer contacts collected from a web form into a centralized CardDAV address book for unified access across devices and applications.

Properties

Name Meaning
Address Book Path The server-relative path to the address book where the contact will be created. Must start with "/". Spaces and special characters are automatically URL-encoded. Example: /addressbooks/user/contacts/
Contact ID A unique identifier string for the contact. Used as the filename (with .vcf extension) on the server. Example: contact-123
Contact Data (vCard) The contact information formatted as a vCard (.vcf) string. This contains all contact details like name, phone, email, etc., in standard vCard format

Output

The output JSON object for the Create Contact operation includes:

  • success (boolean): Indicates whether the contact creation was successful (HTTP status code 2xx).
  • statusCode (number): The HTTP response status code returned by the CardDAV server.
  • contactId (string): The unique identifier of the created contact (as provided in input).
  • addressBookPath (string): The normalized path of the address book 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.
  • The base URL must include the protocol (http:// or https://) and be correctly configured in the node credentials.
  • The node uses HTTP methods (PUT for create) with XML and vCard content types to communicate with the CardDAV server.
  • Proper permissions on the CardDAV server are required to create contacts in the specified address book path.

Troubleshooting

  • Invalid Base URL error: Occurs if the base URL in credentials is missing or does not start with http:// or https://. Fix by ensuring the full URL with protocol is set.
  • Absolute URLs not allowed: Paths must be server-relative starting with /. Do not provide full URLs in path fields.
  • Host not found / Connection refused / Timeout: Network issues or incorrect server hostname/port in credentials. Verify server accessibility and network settings.
  • HTTP errors: Non-2xx responses indicate failure. Check server logs and ensure the user has write permissions on the address book path.
  • Encoding issues: Special characters and spaces in paths are auto-encoded; avoid manually encoding them to prevent double encoding.

Links and References

Discussion