I’d like to get a script I can run inline in a shortcut.
I want to be able to feed in a magic variable date and have it converted to a scriptable date so I can find reminders with said date.
Any help wanted
I’d like to get a script I can run inline in a shortcut.
I want to be able to feed in a magic variable date and have it converted to a scriptable date so I can find reminders with said date.
Any help wanted
Any reason you don’t want to use Shortcuts’ native Find Reminders action?
Not sure if this is what you are looking for. I use this script to find uncompleted Reminders back a certain amount of days which you could change with a magic variable. I do find that Scriptable is a bit faster in locating reminder items than the stock Shortcut actions.
let today = new Date()
let lastWeek = new Date()
lastWeek.setDate(lastWeek.getDate() - 14)
let yreminders = await Reminder.incompleteDueBetween(lastWeek, today)
let value = []
// console.log(yreminders)
for (reminder of yreminders) {
let name = reminder.title
let id = reminder.identifier
// console.log(reminder)
value.push({name, id})
}
Script.complete()
Script.setShortcutOutput({"value": value})
console.log(value)
I’m going to plug this into a script that will complete the tasks. No native complete task action for Reminders.
I know there’s a Toolbox Pro action for this, but it costs $$$ and Scriptable doesn’t