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 books into other systems or applications via n8n automation.

For example, you can use this node to fetch all user address books from a corporate CardDAV server and then process or export them elsewhere.

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. Default is /addressbooks/user/.

Output

The node outputs JSON data with the following structure:

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

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

Example output JSON snippet:

{
  "addressBooks": [
    {
      "href": "/addressbooks/user/john/",
      "displayName": "John's Contacts",
      "description": "Personal contacts"
    },
    {
      "href": "/addressbooks/user/jane/",
      "displayName": "Jane's Contacts",
      "description": null
    }
  ],
  "statusCode": 207
}

The node does not output binary data for 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 XML-based WebDAV/CardDAV requests (PROPFIND) to interact with the server.
  • No additional external services beyond the CardDAV server are required.

Troubleshooting

Common Issues

  • Invalid Base URL: If the base URL in credentials is missing the protocol or malformed, the node will throw an error. Ensure the URL starts with http:// or https://.
  • Absolute URLs in Paths: The node expects server-relative paths starting with /. Providing absolute URLs in path parameters will cause errors.
  • Connection Errors: Network issues such as host not found, connection refused, or timeouts will result in descriptive errors indicating the problem.
  • Permission Issues: If the CardDAV server denies access, the node will return HTTP error codes which should be checked.

Error Messages and Resolutions

  • "Invalid Base URL in credentials. Include protocol (http:// or https://), e.g. https://your-server/remote.php/dav"
    Resolution: Update credentials to include full URL with protocol.

  • "Absolute URLs are not allowed in path fields. Use a server-relative path starting with '/'."
    Resolution: Provide only relative paths starting with / for address book home sets.

  • "Host not found"
    Resolution: Verify the server hostname is correct and reachable.

  • "Connection refused"
    Resolution: Check if the server is running and accessible on the specified port.

  • "Connection timed out"
    Resolution: Network may be slow or blocked; verify connectivity.

  • HTTP errors like 401 Unauthorized or 403 Forbidden indicate authentication or permission problems; check credentials and server permissions.

Links and References

Discussion