Calendar Trigger (Calendar Event Watcher)
The Calendar Trigger monitors ICS calendar feeds for new events and automatically starts workflows when new calendar entries are found.
What does this integration do?
The Calendar Trigger regularly retrieves an ICS calendar feed and monitors it for new events. When a new calendar entry is detected, it automatically starts the linked workflow with the event information.
Typical Use Cases:
- Meeting Preparation: Automatic preparation of meetings and rooms
- Event Management: Workflow triggering for event preparation and follow-up
- Reminders: Automatic notifications before important appointments
- Resource Management: Automatic booking and release of resources
- Workflow Orchestration: Event-based triggering of business processes
- External System Integration: Synchronization with other calendar systems
User Configuration
Calendar Source
Calendar URL (Calendar URL)
- Purpose: URL of the ICS calendar feed to be monitored
- Format: Complete HTTPS URL to an ICS file
- Examples:
https://calendar.google.com/calendar/ical/[calendar-id]/public/basic.icshttps://outlook.office365.com/calendar/[calendar-id]/calendar.icshttps://company.com/events.icshttps://api.calendarsystem.com/feed/public.ics
Poll Interval (ms) (Polling Interval in Milliseconds)
- Purpose: Time interval between calendar queries
- Default:
60000(1 minute) - Format: Milliseconds
- Examples:
30000(30 seconds for frequent updates)300000(5 minutes for normal monitoring)3600000(1 hour for rare updates)
Data Output
Result (Event) - Variable for Event Data
- Purpose: Name of the variable that stores the information of the new calendar entry
- Content: Structured event information from the ICS feed
- Example Variable:
newEvent
How it Works
Monitoring Mechanism
Polling System:
- Regular HTTP queries of the ICS feed
- Parsing ICS data into structured event objects
- Tracking already seen events via UID
New Event Detection:
- Each event has a unique UID
- Already processed UIDs are stored
- Only new UIDs trigger workflows
Error Handling:
- Robust handling of network errors
- Continuation during temporary failures
- Logging of connection problems
Workflow Integration
Data Format
Calendar Entry (Result Variable):
{
"uid": "event-12345-67890@calendar.example.com",
"summary": "Weekly Team Meeting",
"description": "Discussion of project progress and planning",
"start": "2024-03-15T09:00:00Z",
"end": "2024-03-15T10:00:00Z",
"location": "Conference Room A",
"organizer": "max.mustermann@company.com",
"attendees": ["anna.schmidt@company.com", "peter.mueller@company.com"],
"status": "CONFIRMED",
"created": "2024-03-10T14:30:00Z",
"lastModified": "2024-03-12T16:45:00Z"
}
Field Descriptions:
- uid: Unique identifier of the event
- summary: Title/subject of the event
- description: Detailed description
- start: Start time (ISO 8601 format)
- end: End time (ISO 8601 format)
- location: Event location
- organizer: Email of the organizer
- attendees: Array of attendee emails
- status: Status (CONFIRMED, TENTATIVE, CANCELLED)
- created: Creation timestamp
- lastModified: Last modification
Usage in Subsequent Steps
Process Event Information:
Variable: newEvent
In LLM Action:
"Create an agenda for the following meeting: {{newEvent.summary}} on {{newEvent.start}}"
In Script Action:
const event = memory.load('newEvent');
const startTime = new Date(event.start);
const isToday = startTime.toDateString() === new Date().toDateString();
Send Notifications:
Variables: newEvent
In Email Action:
To: {{newEvent.attendees}}
Subject: Reminder: {{newEvent.summary}}
Body: The meeting "{{newEvent.summary}}" will take place on {{newEvent.start}}.
Practical Examples
Meeting Preparation
Configuration:
- Calendar URL:
https://company.com/calendar/meetings.ics - Poll Interval:
300000(5 minutes) - Result:
upcomingMeeting
Usage: Automatic room booking, agenda creation, attendee notification
Event Management
Configuration:
- Calendar URL:
https://events.company.com/public-events.ics - Poll Interval:
600000(10 minutes) - Result:
newEvent
Usage: Event promotion, resource planning, catering orders
Maintenance Window Monitoring
Configuration:
- Calendar URL:
https://it.company.com/maintenance.ics - Poll Interval:
60000(1 minute) - Result:
maintenanceWindow
Usage: System maintenance, notifications, backup scheduling
Project Milestones
Configuration:
- Calendar URL:
https://pm.company.com/project-milestones.ics - Poll Interval:
3600000(1 hour) - Result:
milestone
Usage: Project status updates, reports, stakeholder notifications
Technical Details
Schema Configuration
configSchema: {
url: {
name: 'Calendar URL',
description: 'ICS feed URL',
schema: z.string().url(),
},
pollInterval: {
name: 'Poll Interval (ms)',
description: 'Interval for polling the calendar feed',
schema: z.number().default(60000),
},
outputName: {
name: 'Result (Event)',
reference: 'memory-out',
schema: z.string(),
},
}
Internal Implementation
ICS Parser:
- Uses specialized ICS parser for RFC 5545 compatibility
- Extraction of all relevant event properties
- Robust handling of different ICS formats
HTTP Client:
- Uses Axios for reliable HTTP requests
- Support for various authentication types
- Automatic error handling and retry logic
Memory Management:
- Efficient storage of seen event UIDs
- Automatic garbage collection for old events
- Optimized performance for large calendars
Best Practices
Calendar URLs
URL Security:
- Use HTTPS URLs for secure transmission
- Validate URL access permissions
- Use read-only/public calendar URLs
Calendar Management:
- Use specific calendars for workflow triggers
- Organize events with clear conventions
- Document calendar URLs for the team
Performance
Polling Optimization:
- Adjust poll intervals to calendar frequency
- Avoid too frequent polling for rare events
- Consider server load of calendar provider
Resource Management:
- Monitor network traffic
- Implement caching where possible
- Limit number of simultaneous calendar triggers
Robustness
Error Handling:
- Implement fallback strategies for failures
- Validate event data in subsequent steps
- Handle different ICS formats and versions
Monitoring:
- Monitor polling success rates
- Track event processing times
- Implement alerts for calendar failures
Integration
Event Processing:
- Implement timezone handling for international calendars
- Consider recurring events
- Validate date/time formats
Workflow Design:
- Combine with time-based triggers for reminders
- Implement event status handling (CANCELLED, etc.)
- Consider event updates and deletions
The Calendar Trigger enables seamless integration of calendar systems into automated workflows and provides flexible, reliable monitoring of appointments and events.