Automation Patterns
Once you've created your first automation rule, these patterns cover the most useful ways teams and families actually use PrimeCal's automation system day to day.
Pattern 1: Color-Code By Keyword
Goal: Automatically distinguish event types without manually picking a color every time.
- Trigger:
event.createdorevent.updated - Condition:
titlecontains "Interview" - Action:
set_event_color→ Purple
Repeat with different keywords and colors — "Doctor" → Red, "School" → Yellow, "1:1" → Sky. Within minutes you get a calendar that's color-coded by event type without touching the color picker yourself.
Pattern 2: Flag Long Events for Review
Goal: Catch unusually long meetings before they clutter the week.
- Trigger:
event.created - Condition: computed
durationgreater than 120 (minutes) - Action:
set_event_color→ Orange (your "needs review" signal)
Pattern 3: Highlight Events Starting Soon
Goal: Make today's urgent events visually stand out.
- Trigger:
event.starts_in→ 60 minutes - Condition: none needed (or filter by calendar)
- Action:
set_event_color→ Red
This re-colors events automatically as they approach, then they revert to normal once event.updated fires again on the next edit — useful for daily standups and time-boxed work blocks.
Pattern 4: Webhook-Driven Event Creation
Goal: Let an external tool trigger calendar changes automatically.
- Trigger:
webhook.incoming - Condition:
webhook.data.statusequals "confirmed" (using smart value extraction) - Action:
set_event_color→ Green
For example, a booking system can POST a JSON payload to your rule's unique webhook URL whenever an order is confirmed, and PrimeCal reacts automatically. See Webhooks for the full payload format.
Pattern 5: Calendar Import Cleanup
Goal: Make imported events match your color scheme instead of arriving uncolored.
- Trigger:
calendar.imported - Condition:
calendar.nameequals "Google Calendar Import" - Action:
set_event_color→ your chosen color
This runs automatically every time a sync brings in new events from Google Calendar, Microsoft 365, or another connected provider.
Pattern 6: Boolean Logic for Precise Matching
Combine multiple conditions with AND/OR for sharper rules:
title contains "Review"ANDduration > 60→ only long review meetings get flaggedtitle contains "Urgent"ORtitle contains "ASAP"→ catch either keyword
Use NOT at the condition level to exclude cases — for example, color all meetings except ones on your personal calendar.
Start From a Template
If you're not sure where to start, the built-in Automation Templates cover these exact patterns pre-configured — clone one and adjust the keyword or color to fit your workflow.
Debugging a Rule That Isn't Firing
Check the rule's audit log first — every execution attempt (successful or not) is recorded with the exact condition values evaluated. See Troubleshooting Automations for the full checklist.