# New Note using Drafts Fails

**URL:** <https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356>\
**Category:** Discussion & Help\
**Created:** [December 8, 2020, 3:02pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356 "2020-12-08T15:02:08Z")\
**Posts on this page:** 3\
**Page:** 3

<div class="post-metadata">

**Author:** ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)\
**Post date:** [December 21, 2020, 11:19pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/41 "2020-12-21T23:19:53Z")

</div>

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](https://discourse.hookproductivity.com/t/hook-integration-scripts-v-142-now-available-updated-apple-notes-drafts-and-bookends-integration/2439/4).

There’s [Linking Drafts - Drafts User Guide](https://docs.getdrafts.com/docs/drafts/cross-linking#wiki-style-external-links). We’re looking into whether it’s possible to add those links through automation. Anyone here use Drafts automation?

---

<div class="post-metadata">

**Author:** ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)\
**Post date:** [December 22, 2020, 1:39am UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/42 "2020-12-22T01:39:53Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![LucB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/lucb/32/2228_2.png) [@LucB](https://discourse.hookproductivity.com/u/LucB)\
**Post date:** [December 22, 2020, 4:43am UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/43 "2020-12-22T04:43:51Z")

</div>

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.

[Previous page](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356.md?page=2)
