iCloud Calendar icon

iCloud Calendar

Interact with iCloud Calendar via CalDAV.

Overview

This node integrates with iCloud Calendar using the CalDAV protocol, allowing users to perform various calendar operations such as retrieving calendar details, listing calendars, fetching events, creating and deleting events, and querying free/busy availability.

For the Get Calendar Details operation specifically, the node fetches detailed metadata about a selected calendar, including its name, owner, color, timezone, supported components (like events or tasks), sharing status, visibility, and privileges. This is useful when you want to inspect or verify properties of a specific calendar before performing further actions on it.

Common scenarios:

  • Automating workflows that depend on calendar metadata, e.g., syncing calendar info to another system.
  • Displaying calendar details in dashboards or reports.
  • Validating calendar configurations programmatically.

Example:

  • You select a calendar by name or ID and retrieve its details to check if it is shared or private, what color it uses, and which types of items it supports.

Properties

Name Meaning
Calendar Name or ID Select a calendar from a dynamically loaded list or specify its ID via expression. Required for this operation.

The property "Calendar Name or ID" lets you choose which calendar's details to retrieve. The options are loaded dynamically from your iCloud account calendars.


Output

The output JSON object for the Get Calendar Details operation contains detailed information about the specified calendar, including:

  • id: The full calendar URL or identifier.
  • calendarId: The calendar's unique ID extracted from the URL.
  • name: The display name of the calendar.
  • type: Resource type, typically "calendar".
  • isShared: Boolean indicating if the calendar is shared.
  • isDefault: Boolean indicating if this is the default calendar.
  • isVisible: Boolean indicating if the calendar is visible (not hidden).
  • purpose: Type of calendar content, e.g., "events", "tasks", "mixed".
  • ctag: Change tag used for synchronization.
  • color: The calendar's color code.
  • order: Order index for sorting calendars.
  • privileges: Array of user privileges on the calendar.
  • owner: Owner information (usually a URL or identifier).
  • rawResourceTypes: Raw resource types returned by the server.
  • rawSupportedComponents: Supported calendar components like "VEVENT" or "VTODO".

This rich metadata allows downstream nodes or processes to understand the calendar's characteristics and permissions.


Dependencies

  • Requires an API authentication credential with username and password for iCloud CalDAV access.
  • Uses HTTP requests with XML payloads to communicate with the iCloud CalDAV server (https://caldav.icloud.com).
  • Depends on external libraries for:
    • HTTP requests (axios)
    • XML parsing (xml2js)
    • Timezone handling (moment-timezone)
    • Recurrence rules (rrule)
    • Cryptography for UID generation (crypto)

No additional environment variables are required beyond the API credentials.


Troubleshooting

Common Issues

  • Authentication failures: Incorrect or expired credentials will cause errors when accessing the CalDAV server.
  • Calendar not found: Specifying an invalid calendar ID or name may result in empty or error responses.
  • Network issues: Connectivity problems can cause request timeouts or failures.
  • Parsing errors: Malformed XML responses or unexpected data formats might cause parsing exceptions.

Error Messages and Resolutions

  • "Could not determine user principal URL"
    Indicates failure to retrieve or parse the user's principal URL from the CalDAV server. Check credentials and network connectivity.

  • "Could not extract user ID from principal URL"
    The node expects a specific pattern in the principal URL; if missing, it cannot proceed. Verify the CalDAV server response.

  • HTTP errors with status codes (e.g., 401, 403, 404, 500)
    These indicate authorization issues, resource not found, or server errors. Review credentials, calendar IDs, and server status.

  • "Failed to retrieve calendars" or "Failed to get user principal"
    Usually caused by network or permission issues. Ensure the API key has proper access and the network allows outbound connections.

  • "Unexpected error" with Axios error details
    Generic catch-all for HTTP or parsing errors. Inspect the detailed message and response data for clues.


Links and References


Note: This summary is based solely on static analysis of the provided source code and input property definitions without runtime execution.

Discussion