Action

Import Reminders

Posted by RosemaryOrchard, Last update over 4 years ago - Unlisted

Imports items from a Reminders list and marks them as complete. The imported items are appended to your Draft as tasks with the note in brackets like this:

- [ ] Cookies (chocolate chip)

Steps

  • script

    let p = Prompt.create();
    ReminderList.getAllReminderLists().forEach(function(list) {
    	p.addButton(list.title);
    });
    p.show();
    
    let list = ReminderList.find(p.buttonPressed);
    
    if (list) {
    	let listText = '';
    	list.incompleteTasks.forEach(function(item){
    		listText += "\n- [ ] " + item.title;
    		if (item.note) {
    			listText += ' (' + item.note + ')';
    		}
    		item.isCompleted = true;
    		item.update();
    	});
    	draft.content = draft.content + listText;
    	draft.update();
    }

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.