Script Reminders in similar way as Things?

I have a script that loops takes several inputs from HTML web views and creates Things todos with them. Basically, I push each of these todo objects to an array, then use the “TJSContainer.create” to send them all to Things in one bunch.

Is there a way of doing something similar using Reminders? In other words, can I gather a bunch of todos in several loops, then send them all to a Reminders list in one go?

There is not any kind of batch operation APIs for Reminders. You could certainly gather your information and loop over it creating Reminders tasks at the end of your script, or create the reminders and keep them in an array as you build them, only looping over that array to call .update() on each reminder to actually commit the changes at the end.

The main purpose of the Things TJSContainer functionality provide by Things was to deal with preventing you from having to jump back and forth to Things for each created task since it is using URL schemes. There’s no need to worry about that with scripted creation of tasks in Reminders, because it all happens in the background without leaving Drafts.

Ok, right. Much easier than I anticipated. Should have just tried it first I guess! I wasn’t sure if I’d need to reset the variable tied to “list.createReminder” each time, but it looks like it’s not necessary because the “update” commits the reminder right away.