Add calendar event
Creates an event in the Calendar app, with optional length, repeat and alert.
Add title to the calendar
Keyboard Maestro: CreateCalendarEvent
Details #
Adds one event to a calendar in the Calendar app. Only title and start are required.
When it ends. Give end for an exact end time. Without it, the event lasts duration of durationUnit from the start. The defaults are 60 minutes for a timed event and 1 day for an all-day event. durationUnit reads as days, hours or minutes by its first letters (day, hour; anything else means minutes). The step fails if the end comes before the start.
Dates. Write them like 2026-10-24 09:30. Other formats macOS can parse also work. Start and end are in your Mac's time zone.
Repeat. none (the default), daily, weekly, fortnightly (also biweekly, every two weeks), monthly or yearly (also annually).
Alert. alarm is how long before the start Calendar should alert you. alarmUnit is minutes (the default), hours or days, read by first letters.
Which calendar. calendar is the calendar's name. Left out, the first calendar you can write to is used.
The step has no output. The Trace note names the calendar the event went to.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
start | text | Yes | Required. Start date and time. | |
title | text | Yes | Required. The event's name. | |
alarm | any value | Minutes (or alarmUnit) before the start to alert. Left out, no alert is added. | ||
alarmUnit | text | minutes, hours or days. | ||
allDay | yes / no | true makes it an all-day event. | ||
calendar | text | The calendar's name. Optional. | ||
description | text | Same as notes. If both are given, notes wins. | ||
duration | any value | A number (or text holding one) of durationUnit. Used when there is no end. | ||
durationUnit | text | minutes, hours or days. | ||
end | text | End date and time. Wins over duration. | ||
location | text | The location text. | ||
notes | text | The event's notes. description is another spelling of notes. | ||
repeat | text | none, daily, weekly, fortnightly, biweekly, monthly, yearly or annually. Anything else fails. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Add the event “Review notes” to the calendar
- Show “Event added”
Gotchas #
Fails with
calendar.addEvent needs a titleorcalendar.addEvent needs a start date, like 2026-10-24 09:30 (got "...").Fails with
"..." isn't an end date; write it like 2026-10-24 10:30for an end it cannot read, andthe event ends before it starts.Fails with
unknown repeat "..."and lists the allowed values.A
calendarname that does not exist makes Calendar report an error and the step fails.The first run asks for permission to control Calendar (System Settings > Privacy & Security > Automation).
Each run adds a new event. Nothing checks for a copy that is already there.