Create Reminders List?

Hi all! I would be grateful if someone could provide an example shortcut that uses an inline script to create a Reminders List.

I’m familiar-ish with JavaScript but have been having a very hard time with this seemingly simple task,

-Stu

I’ve had a fledgling success with this. Is it possible to specify the color of the list?

There is also createForReminders(title) if you know you want a new one and are not sure if it already exists. I would assume it would be faster but doubtful if anyone could spot the difference.

For both functions they are promises, so you will want to add in an await to ensure it completes before the script continues; ensuring the calendar exists.

Both functions only accept a title parameter, but once created you have a calendar to work with, there’s a color property and and Color object you can make use of.

Just note that you will now need an explicit save on the calendar for the reminders.

Here’s an example (still using the find or create approach you already have) that you should be able to use for your shortcut’s inline script. Just substitute in your variable for the calendar name.

// Create or find an existing reminder calendar
let calTest = await Calendar.findOrCreateForReminders("Family");

// Create a colour for the calendar
let colTest = new Color("FF00FF", 0);

// Apply the colour for the calendar
calTest.color = colTest;

// Save it
calTest.save();

// Tell shortcuts we're ready to continue
Script.complete();

Hope that helps.

Exactly what I was looking for, thank you so much @sylumer!

@sylumer now that you’ve been so helpful, I can’t help but ask another question. Do you know if it’s possible to create a Reminder using scriptable that has a “Remind me on” day, but no time?

It’s possible to create these in Reminders itself, and Drafts just released an update that supports this option. But I haven’t figured out a way to create a reminder like this using Shortcuts. Any help would be much appreciated!

-Stu

dueDate just shows as a Date in the documentation, so I suspect not, but @simonbs would be able to give you a definitive answer on the current state and/or plans around this (he’s the developer of the app).

I also had a scan through the release notes of the betas back to 1.4.4 (121), but don’t see it mentioned; though perhaps it could have been mentioned in an earlier release if it is a feature - Simon does that many things it is hard for mere mortals to keep track.

I realize you’ve asked about Scriptable, but it’s worth pointing out that Toolbox Pro includes an action to create Reminder Lists, including color options. It seems you may have the same limitation to set a date only reminder. In any event, just sharing this possible other option.

Toolbox Pro, among many features, has robust Reminders creation and update capabilities.

Here’s a simple example illustrating this. I hope this helps — jay

@sylumer thanks for pinging Simon. You’re right, he’s incredibly prolific, and maybe this will be enough inspiration for him to add the capability!

@BrainyLiving thank you as well for the lovely ToolBox Pro example. I am in fact a huge ToolBox Pro fan, and have shared some ambitious Shortcuts using it here: https://prolost.com/blog/toolboxpro

I’ll ping Alex and ask him about creating reminders with dates-only. However, in this case I’m trying to build a Shortcut to share, and I was hoping to avoid requiring my users to pay for ToolBox Pro. Even though, of course, they should, because it’s awesome.

-Stu

1 Like

I’ll look into if it’s possible to add an API for creating reminders with a due date that only has a date component :blush:

Thanks @simonbs! And thank you for Scriptable, it’s terrific.

The inspiration for this feature request came from seeing it as a new option in the release notes of Drafts 17.2, so I take that as a good indicator that the API allows it.

1 Like