Markdown Tasks to OmniFocus

Posted by rosemaryorchard, Last update 12 days ago

Parse any - [ ] incomplete tasks in the current Draft and add them to your OmniFocus inbox.

Steps

  • script

    // See online documentation for examples
    // https://docs.getdrafts.com/docs/actions/scripting
    
    let taskpaper = '';
    draft.content.split("\n").forEach(function(line){
    	if (line.startsWith('- [ ]')) {
    		taskpaper += line.replace('[ ]', '') + "\n";
    	}
    });
    
    const baseURL = "omnifocus://x-callback-url/paste";
    let cb = CallbackURL.create();
    cb.baseURL = baseURL;
    cb.addParameter("content", taskpaper.trim());
    cb.open();

Options

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