Action
Send to Things Inbox
Posted by Bxbtech,
Last update
21 days ago
UPDATES
21 days ago
Title change
21 days ago
Title change
21 days ago
Update icon
21 days ago
Change title
Change description
Creates a Things Inbox to-do from each line of the draft.
Steps
-
script
// See online documentation for examples // https://docs.getdrafts.com/docs/actions/scripting // Send each line of the draft to the Things Inbox as a separate to-do const lines = draft.content.split("\n").map(l => l.trim()).filter(l => l.length > 0); if (lines.length === 0) { alert("Draft is empty."); context.cancel(); } else { const todos = lines.map(line => { const t = TJSTodo.create(); t.title = line; return t; }); const cb = CallbackURL.create(); cb.baseURL = TJSContainer.create(todos).url; if (!cb.open()) { console.log(cb.status); context.fail(); } }
Options
-
After Success Trash Notification Info Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.