# 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:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdr](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rdr/32/1301_2.png) [@rdr](https://discourse.hookproductivity.com/u/rdr)\
**Post date:** [December 8, 2020, 3:02pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/1 "2020-12-08T15:02:08Z")

</div>

I’ve had a Hook license for a while, but am just now trying learn it in earnest.

My first attempt at connecting a New Note via Drafts hasn’t been good. In Preference | Notes I set the default to use Drafts from the popdown list. (I’m using Hook 2.0.3 and the paid version of Drafts 24.1.10)

But when I invoke Command-N, I get a dialog that says “No address returned. The Hook to New script for com.agiletortoise.Drafts-OSX must return a valid URL.”

I checked and there is a script for Drafts “New Item” in Preferences | Scripts.

Can anyone point me in the right direction? Thanks!

– Robert

---

<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 8, 2020, 6:12pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/2 "2020-12-08T18:12:04Z")

</div>

Is your language set to English? Drafts does not yet fully support automation, so the `Hook to New` script uses UI scripting (which is why it is marked as √🤔 on [Linkable Mac Apps – Hook](https://hookproductivity.com/what-mac-apps-are-compatible-with-hook-app)), currently in English. Even in English, UI scripting does have some limitations. Having said that, we often test Hook + Drafts on our systems and I tested again and it works.

Greg Pierce, the Drafts dev, has kindly pledged to round out Draft’s AppleScript in an upcoming release.

If your macOS account is English, could you please let us know the macOS version and Drafts version?

---

<div class="post-metadata">

**Author:** ![rdr](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rdr/32/1301_2.png) [@rdr](https://discourse.hookproductivity.com/u/rdr)\
**Post date:** [December 8, 2020, 6:15pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/3 "2020-12-08T18:15:28Z")

</div>

Hi, Luc. Thanks for the speedy reply.

Yes, my language settings are for English.

My macOS version is 10.15.5. I’m using Drafts Pro version 24.1.10.

– Robert

---

<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 8, 2020, 6:17pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/4 "2020-12-08T18:17:39Z")

</div>

Sometimes there are latency issues,

where the script says:

> delay 0.2

you might want to try using say 1.0, just to see if that is an issue. then you would work down to a more reasonable number that works.

---

<div class="post-metadata">

**Author:** ![rdr](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rdr/32/1301_2.png) [@rdr](https://discourse.hookproductivity.com/u/rdr)\
**Post date:** [December 8, 2020, 6:20pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/5 "2020-12-08T18:20:06Z")

</div>

Unfortunately, no. Even at 2.0 seconds, still get the same message.

---

<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 8, 2020, 6:23pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/6 "2020-12-08T18:23:48Z")

</div>

> [@rdr](#):
>
> My macOS version is 10.15.5. I’m using Drafts Pro version 24.1.10.

I don’t know that this would make a difference (I’d have to check our testing history), but I notice you’re on 10.15.5 rather than [macOS Catalina 10.15.6 Update](https://support.apple.com/kb/DL2047).

---

<div class="post-metadata">

**Author:** ![rdr](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rdr/32/1301_2.png) [@rdr](https://discourse.hookproductivity.com/u/rdr)\
**Post date:** [December 8, 2020, 6:27pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/7 "2020-12-08T18:27:51Z")

</div>

Yep, I was behind so was just waiting for the dust to settle on the Big Sur update. Perhaps it’s time to pull the trigger. Let’s see if that addresses the issue.

---

<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 8, 2020, 9:32pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/8 "2020-12-08T21:32:38Z")

</div>

Could you please run Hook’s `New Item` Drafts script in Apple’s Script Editor app (it’s in /Applications/Utilities) and let us know what happens in Drafts and the message if any that Apple’s Script Editor shows in its bottom pane?

---

<div class="post-metadata">

**Author:** ![rdr](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rdr/32/1301_2.png) [@rdr](https://discourse.hookproductivity.com/u/rdr)\
**Post date:** [December 8, 2020, 9:52pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/9 "2020-12-08T21:52:33Z")

</div>

When I tried that first, Luc, I got a message that “Script Editor is not allowed assistive access.” So I allowed that via System Preferences. Now when I run the `New Item` Draft script it runs but I get an empty string (`""`) as the only message returned in the Apple Script Editor.

![Screen Shot 2020-12-08 at 4.51.59 PM](https://discourse.hookproductivity.com/uploads/default/original/2X/2/234bc0e6156fad2f4580d2bb7b32346726f72cbd.jpeg)

---

<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 8, 2020, 11:20pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/10 "2020-12-08T23:20:29Z")

</div>

I should have asked you first whether when you select a doc in Drafts and invoke Hook you get: [No Linkable Item in … – Hook](https://hookproductivity.com/help/hook-window/no-resource-detected/). If so, please see that web page which has troubleshooting tips.

---

<div class="post-metadata">

**Author:** ![rdr](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rdr/32/1301_2.png) [@rdr](https://discourse.hookproductivity.com/u/rdr)\
**Post date:** [December 9, 2020, 2:00pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/11 "2020-12-09T14:00:36Z")

</div>

No, no. I get that. I’m definitely testing against a linkable item. A web page.

Here’s something interesting, I think. This morning there was an update to Drafts in the App Store. So I made the update to version 24.2.5. I noticed, too, that Hook had updated its script library to version 139. I was using 138 yesterday.

I immediately thought I’d try Hook and Drafts with the _same_ web page I was testing with yesterday, which is the Screencasts Online tutorial on Hook.

It worked! How great, I thought. Tried it a few times, and Drafts dutifully brought up my note.

But then I switched to another open tab in Safari, invoked Hook and pressed ^N for a new note. Back to the same error message. Not 3 minutes later, I tried again on this second web page and Hook with Drafts worked.

So, in short, Luc, some progress but also a settling feeling that things with Hook, at least as it concerns Drafts, seem a little fragile.

– Robert

---

<div class="post-metadata">

**Author:** ![RochelleB](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rochelleb/32/1560_2.png) [@RochelleB](https://discourse.hookproductivity.com/u/RochelleB)\
**Post date:** [December 9, 2020, 2:48pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/12 "2020-12-09T14:48:20Z")

</div>

I’d like to add some of my own experiences here. When I invoke Drafts on a Chrome tab and select “Hook to New Drafts” or Command+New, I get a new Draft with the title of the web page, but no link to the web page.

Does Chrome need a bit more script to also get the URL?

I have no problem getting the link to a Draft using Hook within Drafts.

Catalina 10.15.7 (19H2)  
Hook 2.0.3  
Drafts 24.1.10

---

<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 9, 2020, 5:22pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/13 "2020-12-09T17:22:15Z")

</div>

> [@rdr](#):
>
> No, no. I get that. I’m definitely testing against a linkable item. A web page.

Thanks, @rdr. just to be clear, I was actually wondering whether when you invoke Hook on a document in Drafts itself, the Hook window is populated. i.e., doing it the other way around: `Hook to New > TextEdit` from a web page.

---

<div class="post-metadata">

**Author:** ![rdr](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rdr/32/1301_2.png) [@rdr](https://discourse.hookproductivity.com/u/rdr)\
**Post date:** [December 9, 2020, 5:26pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/14 "2020-12-09T17:26:15Z")

</div>

Ah, I apologize for the misunderstanding.

I just checked and Hook seems to work fine when invoked from a document in Drafts. In fact, in some cases where I was able to hook from Safari earlier today, the hook back to Safari appears in the corresponding Drafts note.

– Robert

---

<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 9, 2020, 5:37pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/15 "2020-12-09T17:37:14Z")

</div>

> [@RochelleB](#):
>
> When I invoke Drafts on a Chrome tab and select “Hook to New Drafts” or Command+New, I get a new Draft with the title of the web page, but no link to the web page.

I don’t normally use Chrome. I tested this several times , however, and in my cases the hooks were setup. E.g.,

1. open a _local_ HTML file in Chrome (local, given that I don’t let Chrome connect to the Internet since it cannot be trusted privacy-wise).

2. `Hook to New` \> Drafts

3. invoke Hook on new draft

4. `Copy All Links`

5. paste it here:

The title and links are as expected, working bidirectionally.

Must be something else happening. We’ll have a look.

---

<div class="post-metadata">

**Author:** ![martinewski](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/martinewski/32/1309_2.png) [@martinewski](https://discourse.hookproductivity.com/u/martinewski)\
**Post date:** [December 11, 2020, 7:06pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/16 "2020-12-11T19:06:43Z")

</div>

I’m having exactly the same issue. Increasing the delay in the script doesn’t solve it.  
It does work if Drafts has a window currently open.

macOS 11.0.1 (20B29)  
Hook Version 2.1 (3872)  
Drafts 24.2.10

![Screen Shot 2020-12-11 at 3.59.51 PM](https://discourse.hookproductivity.com/uploads/default/original/2X/a/ada6a16e8c868b4bed9b8cc5b56ae24288697ba8.png)

---

<div class="post-metadata">

**Author:** ![rdr](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rdr/32/1301_2.png) [@rdr](https://discourse.hookproductivity.com/u/rdr)\
**Post date:** [December 17, 2020, 6:11pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/17 "2020-12-17T18:11:53Z")

</div>

Sorry to say that even with the upgrade to MacOS 11.1, Hook 2.1 (3872, scripts version 141) and Drafts 24.2.10 just doesn’t work reliably for me.

![Screen Shot 2020-12-17 at 1.08.33 PM](https://discourse.hookproductivity.com/uploads/default/original/2X/2/241653df73c6c593cc2f202e374f5a4f26a78d91.png)

From what I can see here, this isn’t an issue limited just to me.

@LucB, any new thoughts on this front or would you say it’s time to pick another place for New notes in Hook?

– Robert

---

<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 17, 2020, 6:51pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/18 "2020-12-17T18:51:55Z")

</div>

> [@rdr](#):
>
> @LucB, any new thoughts on this front or would you say it’s time to pick another place for New notes in Hook?

thanks for bringing that up. Well, `Hook to New` is just one of the linking functions (there’s `Copy Link`, etc.), and the Drafts dev has pledged AppleScript for `Hook to New`; so other things being equal, I wouldn’t recommend switching away just for the current `Hook to New` with Drafts. (Drafts does so much; it’s a very unique app. Greg Pierce co-invented x-callback-url , and his commitment to automation can be trusted).

2020-12-17 10:55 (PT). I’ve added a note to the [Link-friendly Mac Apps – Hookmark](https://hookproductivity.com/what-mac-apps-are-compatible-with-hook-app) page (though it already listed Drafts as √🤔 meaning there are currently limitations to the integration.

---

<div class="post-metadata">

**Author:** ![rdr](https://discourse.hookproductivity.com/user_avatar/discourse.hookproductivity.com/rdr/32/1301_2.png) [@rdr](https://discourse.hookproductivity.com/u/rdr)\
**Post date:** [December 17, 2020, 6:54pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/19 "2020-12-17T18:54:53Z")

</div>

Oh, for sure. Drafts is great and I rely on it all the time. That’s primarily why I wanted to use it in concert with Hook. But I also see a lot of value in the `Hook to New` feature of Hook. I’m just saying I think I need to find a more reliable integration so that I can stop fiddling and get to work!

– Robert

---

<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 17, 2020, 6:57pm UTC](https://discourse.hookproductivity.com/t/new-note-using-drafts-fails/2356/20 "2020-12-17T18:57:36Z")

</div>

> [@rdr](#):
>
> I’m just saying I think I need to find a more reliable integration so that I can stop fiddling and get to work!

Yes. That is what I would recommend. Even internally at CogSci Apps , I feel that given that the Drafts automation is on its way, we should probably focus on other integrations and features.

I totally agree `Hook to New` is super useful. I use it **many** times a day.

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