Drafts Action Directory

Todos in Things

Posted by agiletortoise, Last update 4 months ago

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

Install

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

Comments

Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.