ICS

Converts a string of ICS data into an array of json objects

Overview

This node converts raw ICS (iCalendar) data provided as a string into an array of JSON objects, each representing a calendar event. It is useful for parsing and extracting structured information from .ics files, such as those used for sharing calendar events via email or web services. Common scenarios include importing calendar events into n8n workflows, transforming calendar data for further automation, or integrating with other systems that require event details in JSON format.

Practical examples:

  • Importing meeting invitations from emails and extracting event details.
  • Converting shared public calendars into structured data for reporting or notifications.
  • Integrating external calendar feeds into project management tools.

Properties

Name Meaning
ICS Raw Data This is the raw ICS data. Paste the full content of an .ics file here.

Output

The output is an array of JSON objects, each corresponding to a VEVENT entry in the ICS data. Each object contains:

  • All standard event fields parsed from the ICS (e.g., summary, start date, end date, location, etc.).
  • An additional field id containing the unique identifier of the event.
  • An alarms array, listing any associated alarms (VALARM entries) for the event, each with its own properties and an id.

Example output:

[
  {
    "type": "VEVENT",
    "summary": "Team Meeting",
    "start": "2024-07-01T10:00:00Z",
    "end": "2024-07-01T11:00:00Z",
    "location": "Conference Room",
    "id": "event-uid-12345",
    "alarms": [
      {
        "action": "DISPLAY",
        "description": "Reminder",
        "trigger": "-PT15M",
        "id": "alarm-uid-1"
      }
    ]
  }
]

If there are errors during processing and "Continue On Fail" is enabled, the output will also include an error field with error details.

Dependencies

  • node-ical: Used for parsing ICS data.
  • No external API keys or special n8n configurations are required.

Troubleshooting

Common issues:

  • Malformed ICS data: If the input is not valid ICS, parsing will fail. Ensure you paste the complete and correct ICS content.
  • Missing events: Only VEVENT entries are included in the output; other types (e.g., VTODO) are ignored.
  • Error messages:
    • "Unexpected token" or similar: Indicates invalid ICS syntax.
    • "Cannot read property 'type' of undefined": The ICS data may be missing expected fields.

How to resolve:

  • Double-check the ICS data for completeness and correctness.
  • If using "Continue On Fail," check the error field in the output for more details about what went wrong.

Links and References

Discussion