Overview
This node integrates with iCloud Calendar via the CalDAV protocol, allowing users to manage calendar events programmatically within n8n workflows. Specifically, the Delete Event operation enables deleting an existing event from a specified iCloud calendar by its event ID.
Common scenarios for this node include:
- Automating calendar management tasks such as removing outdated or canceled events.
- Synchronizing events between different calendar systems by deleting events that no longer exist in a source system.
- Cleaning up test or temporary events created during automated workflows.
Example use case:
- After a meeting is canceled in another system, automatically delete the corresponding event from the iCloud calendar to keep it up-to-date.
Properties
Name | Meaning |
---|---|
Calendar Name or ID | Select the target calendar from a list of available calendars or specify its ID using an expression. |
Event ID | The unique identifier of the event to be deleted from the selected calendar. |
Output
The output JSON contains a single object indicating the success of the deletion and the ID of the deleted event:
{
"success": true,
"eventId": "string"
}
success
: Boolean indicating whether the event was successfully deleted.eventId
: The ID of the event that was deleted.
No binary data is output by this operation.
Dependencies
- Requires valid iCloud API credentials (username and password) configured in n8n to authenticate with the CalDAV service.
- Uses HTTP Basic Authentication to communicate with the iCloud CalDAV server.
- Relies on external libraries such as Axios for HTTP requests and xml2js for XML parsing.
- The node internally discovers the user principal URL and calendar URLs dynamically via CalDAV PROPFIND requests.
Troubleshooting
Common Issues
- Authentication failures: If credentials are incorrect or expired, the node will fail to authenticate with iCloud CalDAV, resulting in errors.
- Invalid calendar or event IDs: Providing a non-existent calendar ID or event ID will cause the deletion request to fail.
- Network or connectivity problems: Issues reaching the iCloud CalDAV server can cause timeouts or connection errors.
Error Messages and Resolutions
- "Failed to get user principal": Indicates inability to retrieve the user's principal URL from iCloud. Check credentials and network connectivity.
- "Failed to delete event": The DELETE HTTP request returned an error status. Verify that the calendar ID and event ID are correct and that the event exists.
- "Could not extract user ID from principal URL": Unexpected response format from iCloud. This may indicate changes in the CalDAV API or malformed responses.
- Axios errors with status codes: These include HTTP 4xx or 5xx errors. Review the status code and message for details; often related to permissions or invalid inputs.
To resolve issues:
- Confirm that the iCloud credentials are correct and have necessary permissions.
- Ensure the calendar and event IDs are accurate.
- Check network access to
caldav.icloud.com
. - Re-authenticate if the CalDAV base URL or tokens have changed.