Skip to content

Notification ​

Alerts, notifications, and banners.

import Notification;

showAlert ​

Displays an alert with a title, a message, and two buttons. If the user selects the OK button, the shortcut continues. The cancel button stops the shortcut.

showAlert(message: Text, title: Text, showCancelButton: Boolean)
ParameterTypeDefault
messageText"Do you want to continue?"
titleText—
showCancelButtonBooleantrue

Shortcuts action: is.workflow.actions.alert

showNotification ​

Displays a local notification.

showNotification(title: Text, body: Text, playSound: Boolean, attachment: Any)
ParameterTypeDefault
titleText—
bodyText—
playSoundBooleantrue
attachmentAny—

Shortcuts action: is.workflow.actions.notification

showResult ​

Shows a preview of the provided content. If run from Siri, speaks the provided text.

showResult(content: Text)
ParameterTypeDefault
contentText""

Shortcuts action: is.workflow.actions.showresult

viewContentGraph ​

Shows the results of the previous action in the Content Graph.

viewContentGraph(input: Any)
ParameterTypeDefault
inputAny—

Shortcuts action: is.workflow.actions.viewresult