Show notification
Posts a macOS notification with a title, an optional body and an optional sound.
Show notification title
Keyboard Maestro: Notification, DisplayText
Details #
Posts a banner through Notification Center. The first time it runs, macOS asks whether Switchboard may send notifications. Use it for results you want to find later; for a message that disappears by itself use Show message.
The step's output is the title and body it showed.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
title | text | Yes | Required in the schema. Shown in bold. If it is missing at run time, Switchboard is used. | |
body | text | The second line. Leave it out for a title-only banner. | ||
sound | text | default plays the system alert sound. Any other value is the name of a sound file macOS can find (for example one in ~/Library/Sounds). Leave it out for silence. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Show a notification “Download done”
Gotchas #
A dry run does not post it. The trace shows the step as simulated.
If notifications are switched off for Switchboard, the step fails and says to allow them in System Settings > Notifications.
A build with no app bundle (the bare engine used in tests) cannot show a banner. There the step still succeeds and the trace note says
logged onlywith the reason.