New Note using Drafts Fails

Incidentally, we’d like to enhance the Hook to New > Drafts to add a linkback in the new doc itself to the source, like we do for Apple Notes per Hook integration scripts v.142 now available — Updated Apple Notes, Drafts and Bookends integration - Releases - Hook Productivity Forum.

There’s Linking Drafts - Drafts User Guide. We’re looking into whether it’s possible to add those links through automation. Anyone here use Drafts automation?

and the answer comes from one of our own here, it can be done such as:

tell application "Drafts"
        activate

        set obj to make new draft with properties
{content:"[[url:bookends://sonnysoftware.com/8253]]", tags:{"hook"}}
        set rec to obj as record
        return "drafts5://open?uuid=" & «class seld» of rec

end tell

In case anyone wants to try it, here’s a new version of Hook to New > Drafts

tell application "Drafts"
        activate

        set obj to make new draft with properties {content:"[$title]($link)", tags:{"hook"}}
        set rec to obj as record
        return "drafts5://open?uuid=" & «class seld» of rec

end tell

Instead of the new note having a vanilla title , it is a link back to the source. That means on iPad and iPhone you can use the links to get back to the source.

2 Likes