Action

Reminders (Fantastical/Lists)

Posted by @brentacPrime, Last update over 6 years ago

This is an action that prompts you to run either the Fantastical url scheme to add a reminder, or select from a list to add each line of the draft as a new item on the lists. It’s currently set to Target or Costco (as those are the list I use) but you can change it to suit your needs.

I’ve updated this action to include the “Fantastically Good Reminder Parser” from @pdavisonreiber.

If you prefer Fantastical I’ve left that in, but disabled. Simply enable that block and disable the one with the Reminder Parser.

Steps

  • script (disabled)

    //This script uses the Fantastical url scheme
    
    var p = Prompt.create();
    
    p.addButton("Fantastical");
    p.addButton("Target");
    p.addButton("Costco");
    
    var didSelect = p.show();
    var Choice = p.buttonPressed
    
    if (Choice == "Fantastical") {
    const baseURL = "fantastical2://x-callback-url/parse/";
    
    	var cb = CallbackURL.create();
    	cb.baseURL = baseURL;
    	cb.addParameter("sentence", draft.content);
    	cb.addParameter("reminder", 1);
    	cb.addParameter("add", 1);
    	var success = cb.open();
    } else { 
        
    const lines = draft.content.split("\n");
    for (var line of lines){
    var list = ReminderList.findOrCreate(Choice);
    var reminder = list.createReminder();
    reminder.title = line;
    reminder.update();
    };
    };
  • script

    //This script uses the Fantastically Good Reminder Parser
    
    var p = Prompt.create();
    
    p.addButton("Reminders");
    p.addButton("Target");
    p.addButton("Costco");
    
    var didSelect = p.show();
    var Choice = p.buttonPressed
    
    if (Choice == "Reminders") {
    var action = Action.find("Fantastically Good Reminder Parser");
    app.queueAction(action, draft);
    } else { 
        
    const lines = draft.content.split("\n");
    for (var line of lines){
    var list = ReminderList.findOrCreate(Choice);
    var reminder = list.createReminder();
    reminder.title = line;
    reminder.update();
    };
    };

Options

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