Action
 Process Meeting Notes
Process Meeting Notes
                  
        Posted by @nahumck,
    Last update
    about 7 years ago
    Process meeting notes to send task-prefixed (- [ ] ) items to Todoist. Save to specified file in iCloud Drive.
Steps
- 
    script// Process Meeting Notes // Scan for lines with tasks and send them to Todoist var d = draft.content; var lines = d.split("\n"); var n = ''; let todoist = Todoist.create(); for (var line of lines) { if (line.includes("- [ ]")) { // Todoist Action var task = line.replace("- [ ]",""); task = task.trim(); var credential = Credential.create("Todoist", "Todoist API"); credential.addTextField("token", "Token"); credential.authorize(); let success = todoist.quickAdd(task); if (success) { console.log("Todoist task created: " + task); } else { ctErrors++; console.log("Todoist error: " + todoist.lastError); } } else { // do nothing with the line } }
- 
    filefileNameTemplate [[safe_title]].txt folderTemplate /Work/ template [[draft]] local false writeType create 
Options
- 
  After Success Default Notification Info Log Level Error 
  Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.