Tasks in a particular Todoist project

Posted by thschick, Last update over 4 years ago

Create tasks in a particular Todoist for each line of the current draft.

You can adapt the targeted project in the script’s first line. [replace ‚Einkaufszettel‘ with your project‘s name]

based on sylumer’s workaround:


  • script

    // create task in Todoist inbox for each line in the draft
    const project ="Einkaufszettel"
    let lines = draft.content.split("\n");
    let todoist = Todoist.create();
    let ctErrors = 0;
    for (let line of lines) {
    	if (line.length > 0) {
    		let success = todoist.quickAdd(line + " #" + project);
    		if (success) {
    			console.log("Todoist task created: " + line);
    		else {
    			console.log("Todoist error: " + todoist.lastError);
    if (ctErrors > 0) {;


  • 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.