Using Hook with Drafts

Drafts is a popular document capture and editing tool by Agile Tortoise.

Hook enables you to link Drafts documents to and from anything that is also linkable.

Copy Link, Copy Markdown Link and Hook to Copied Link

By default, Hook’s Copy Link and Copy Markdown Link in Drafts return links of the form drafts5://. You can paste those links anywhere. You can even use them on your iPad or iPhone.

Hook to New > Drafts

You can use the Hook to New command to create a new Drafts item that is hooked (bidirectionally linked) to the current resource.

The built-in Hook to New > Drafts script requires the latest version of Drafts .

If you are using an earlier version of Drafts that does not have sufficient automation for Hook’s current Hook to New implementation (which uses x-callback-url), you may use this in Hook > Preferences > Script Editor tab :

tell application "Drafts" to activate
set the clipboard to "$title"
tell application "System Events" to tell process "Drafts"
    click menu item "New with Clipboard" of menu 1 of menu bar item "File" of menu bar 1
end tell

--without this weird second activation Drafts won't actually create the new note
tell application "Drafts" to activate

set the clipboard to ""
tell application "System Events" to tell process "Drafts"
    click menu item "Link" of menu 1 of menu item "Copy" of menu 1 of menu bar item "File" of menu bar 1
end tell

delay 0.2
get (the clipboard)

“Hook” tag to Drafts items

When you create a new Drafts document using Hook to New, Hook will apply a “Hook” tag to it. That allows you — on Mac, iPhone or iPad — to search for every task or project that you’ve created with Hook to New. Handy!

This is an introductory feature that will be revisited. Currently these tags are not added on linking, nor are they deleted automatically.

If you would like the tag name to be something different, From Hook > Preferences > Script Editor tab > Drafts > New Item tab script, just change


to use whatever “tagName” you’d like.

If you don’t like this feature, just delete :


from that script.


Search for Drafts Hook-bookmarks

To find Drafts items you’ve processed with Hook, simply

  1. invoke Hook
  2. enter search mode (with ⌘F or a click)
  3. type: url:drafts5 and hit the return key

Your Drafts bookmarks will show up in the search results.

Get Address with x-callback-url

If you are a Hook Pro user who wants to use Hook 2.2.1 with the Drafts app in multiple languages using Draft’s x-callback-url scheme, here’s a Get Address script you can use. As of 2021-01-23, it has only been qualified for macOS Big Sur (it might work on macOS 10.15 too).

set callbackURL to "hook://x-callback-url/setCurrentNode"

set myURL to "drafts://x-callback-url/getCurrentDraft?" & "&x-success=" & callbackURL

set myScript to "open '" & myURL & "'"

do shell script myScript
return callbackURL

See also…

Drafts is discussed and illustrated elsewhere on this website. To find out more:

About this page

Page last updated for Hook 2.1 scripts version 142.

Hook Productivity App Newsletter

Sign-up to receive emails about Hook productivity app. Our emails sometimes include coupons for discounts on great Hook-linkable apps made by other developers.

 Marketing permission: I give my consent to to be in touch with me via email using the information I have provided in this form for the purpose of news, updates and marketing.

What to expect: If you wish to withdraw your consent and stop hearing from us, simply click the unsubscribe link at the bottom of every email we send or contact us at We value and respect your personal data and privacy. To view our privacy policy, please visit our website. By submitting this form, you agree that we may process your information in accordance with these terms.