Action
Send to Journal
Posted by agiletortoise,
Last update
about 17 hours ago
Create a journal entry in the Apple Journal app using the first line of the draft as a title, and the body as the content. Maintains the original creation date of the draft.
Requires the example “Send to Journal” shortcut be installed, as well as the Journal app.
For more details and the example shortcut, see this forum tip
Steps
-
script
// change if you change the name of your shortcut const shortcutName = "Send to Journal" // create a JSON representation of the draft let json = { "title": draft.processTemplate("[[display_title]]"), "body": draft.processTemplate("[[body]]"), "createdAt": draft.processTemplate("[[created|=iso8601]]").replace("T", " ").replace("Z", "") } // Run the shortcut... let shortcut = Shortcut.create(shortcutName, JSON.stringify(json)) if (!shortcut.run()) { console.log(shortcut.result) context.fail() }
Options
-
After Success Default Notification Info Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.