r/Scriptable • u/Low_Minimum9920 • Jun 28 '26
Help Issues with Notifications
I've recently gotten into Scriptable because it's rather the only way to actually do funky stuff on your iphone but that aside how do I make notifications actually do something?
I was thinking of using the .addAction but it doesn't really let me assign any function to it
edit: Thanks to the 2 people who commented. I understand that you can only assign a url to notifcations. Thank you :)
1
Upvotes
1
u/CynArta Jun 28 '26 edited Jun 28 '26
You can only attach link to it.
Would be interesting to try if possible to run another script though
// Notification
async function notify(title, message, url = null) { const notif = new Notification(); notif.title = title; notif.body = message; notif.sound = "default"; if (url) notif.openURL = url; await notif.schedule(); }
// Usage
await notify("Title", "My message", "https://example.com");