Action
Process Meeting Notes
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 = draft.permalink + " (" + task.trim() + " : " + draft.title + ")"; 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 } }
-
file
fileNameTemplate [[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.