CardDAV icon

CardDAV

Interact with CardDAV servers for address book operations

Overview

This node integrates with CardDAV servers to perform address book operations. Specifically, the Get Address Books operation retrieves a list of address books available under a specified home set path on the CardDAV server.

Common scenarios where this node is useful include:

  • Synchronizing or listing all address books from a CardDAV server for contact management.
  • Automating workflows that require fetching address book metadata such as display names and descriptions.
  • Integrating CardDAV address book data into other systems or applications via n8n.

For example, you can use this node to fetch all user address books from a Nextcloud CardDAV server by specifying the user's address book home set path, then process or filter these address books downstream in your workflow.

Properties

Name Meaning
Address Book Home Set Path to the address book home set on the CardDAV server. Must start with "/". Spaces and special characters are automatically URL-encoded. Example: /addressbooks/user/

Output

The node outputs JSON data containing:

  • addressBooks: An array of objects representing each address book found under the specified home set path. Each object includes:

    • href: The URL path (server-relative) to the address book.
    • displayName: The display name of the address book (if available).
    • description: A description of the address book (if available).
  • statusCode: The HTTP status code returned by the CardDAV server for the PROPFIND request.

Example output structure:

{
  "addressBooks": [
    {
      "href": "/addressbooks/user/john/",
      "displayName": "John's Contacts",
      "description": "Personal contacts"
    },
    {
      "href": "/addressbooks/user/john/work/",
      "displayName": "Work Contacts",
      "description": "Contacts related to work"
    }
  ],
  "statusCode": 207
}

No binary data is output by this operation.

Dependencies

  • Requires an API key credential configured with the CardDAV server base URL and authentication details.
  • The base URL must include the protocol (http:// or https://) and be correctly set in the credentials.
  • The node sends XML-based WebDAV requests (PROPFIND) to interact with the CardDAV server.
  • Proper permissions on the CardDAV server are necessary to access the specified address book home set.

Troubleshooting

  • Invalid Base URL in credentials: Ensure the base URL includes the protocol (http:// or https://) and is correctly formatted without trailing slashes.
  • Absolute URLs not allowed in path fields: Paths like the Address Book Home Set must be server-relative starting with /. Do not provide full URLs.
  • Host not found / Connection refused / Timeout errors: Check network connectivity, server hostname, port accessibility, and firewall settings.
  • HTTP errors: The node surfaces HTTP status codes and messages. For example, 401 Unauthorized indicates authentication issues; verify API credentials.
  • Encoding issues: Spaces and special characters in paths are auto-encoded, but malformed input may cause errors. Always start paths with /.

If the node encounters an error during execution, it will throw a descriptive error message indicating the problem and which item caused it.

Links and References

Discussion