Action
append-to-last-draft
Support Action to append text to the last draft via URI Scheme. Install the Action and call is via:
drafts://x-callback-url/runAction?action=append-to-last-draft&text={text_to_add}
Steps
-
script
const textToAdd = draft.content; // will be set via URI Scheme const draftList = Draft.query("", "inbox", [], ["tasklist"], "modified", true); if (draftList.length === 0) { app.displayErrorMessage("No draft to append to."); } else { const lastDraft = draftList[0]; lastDraft.append(textToAdd); lastDraft.update(); }
Options
-
After Success Default Notification None Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.