Marking a reminder as completed

I was wondering if there is a way to mark a specific Reminder as completed using Scriptable given Shortcuts doesn’t have this option. If the Reminder is a repeat item would this also work the same as physically marking it complete (ie Reminders would add the Reminder again after the designated repeat time?). I’m not great with Javascript so would appreciate any assistance.

1 Like

I have had a go varying some other scripts but I am not sure how I code it to accept the parameter from a Shortcut. I am running ios13 and the latest Scriptable beta. In shortcuts I am using PlainText to put the title of the Reminder. How do I then adjust the JavaScript to include this?

var reminder = args.plainTexts(0);

let all = await Reminder.all();
for (let r of all) {
if (r.title == reminder){
r.isCompleted = true;
r.save();
}
}

Here’s an example showing how you can pass multiple arguments via a URL scheme from a Shortcuts shortcut to a named Scriptable script. You would just specify the name of the reminder as a parameter.

Example Scriptable code
let params = args.queryParameters;
console.log(params.scriptName);
console.log(params.foo);
console.log(params.bar);

Hope that helps.

I am trying to work out how to do it with the Scriptable actions step in the latest ios13 betas of Scriptable and Shortcuts. See images.

What you have in your images looks good.

If you’re trying to pass the parameter that’s on the same line as the run command then you need to read it using args.shortcutParameter.

See examples in the attached images, which also include a line at the end to return to Shortcuts.

1 Like

Thanks so much. I have it working now.