Todos in Things

Posted by agiletortoise, Last update over 1 year ago

Send each line of the draft to Things as a separate todo. Required Things 3.4 or greater.

Steps

  • script

    /*
      Send each line of a draft to things as a todo
    */
    const lines = draft.content.split("\n");
    var todos = [];
    
    for (line of lines) {
    	var todo = TJSTodo.create();
    	todo.title = line;
    	todos.push(todo);
    }
    
    const container = TJSContainer.create(todos);
    var cb = CallbackURL.create();
    cb.baseURL = container.url;
    
    if (cb.open()) {
    	console.log("Todos created in Things");
    }
    else {
    	console.fail();
    }

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.