Action
Send to Things Inbox
Posted by Bxbtech,
Last update
about 18 hours ago
UPDATES
about 18 hours ago
Title change
about 18 hours ago
Title change
about 18 hours ago
Update icon
about 18 hours 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.