Action

Omnifocus & Link Back

Posted by jeffmeyerhoff, Last update 11 months ago

Link your drafts and tasks to each other! This creates a new OmniFocus task with a URL to the current draft in the task notes. Once the new task is created in OmniFocus, a URL back to the created task is appended to the draft. Works on iOS and Mac.

Steps

  • script

    // See online documentation for examples
    // https://docs.getdrafts.com/docs/actions/scripting
    var cb = CallbackURL.create();
    const baseURL = "omnifocus:///add?"
      cb.baseURL = baseURL;
      cb.addParameter("name", draft.title);
     
       cb.addParameter("note",draft.permalink);
      
      cb.waitForResponse = true;
      var success = cb.open();
      if (success) {
        
        var response = cb.callbackResponse;
        
        draft.append(response['result']);
        
        
      }
      else {
        context.fail();
      }
    
    

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.