# Hook for Side Notes?

**URL:** <https://discourse.hookproductivity.com/t/hook-for-side-notes/4139>\
**Category:** Hookmark Feature Requests\
**Created:** [November 21, 2021, 4:39pm UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139 "2021-11-21T16:39:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![harets](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/h/71e660/32.png) [@harets](https://discourse.hookproductivity.com/u/harets)\
**Post date:** [November 21, 2021, 4:39pm UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/1 "2021-11-21T16:39:51Z")

</div>

Is there any way to get Hook working with Side Notes? [SideNotes – Quick Notes on Screen Side – Apptorium](https://www.apptorium.com/sidenotes)

---

<div class="post-metadata">

**Author:** ![wernervp](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/w/34f0e0/32.png) [@wernervp](https://discourse.hookproductivity.com/u/wernervp)\
**Post date:** [November 25, 2021, 7:13am UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/2 "2021-11-25T07:13:01Z")

</div>

This would be a great addition indeed. I quickly looked into the scripting possibilities of the app, but I think the developer of SideNotes needs to add some more support to make this work.

---

<div class="post-metadata">

**Author:** ![wernervp](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/w/34f0e0/32.png) [@wernervp](https://discourse.hookproductivity.com/u/wernervp)\
**Post date:** [November 25, 2021, 9:14am UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/3 "2021-11-25T09:14:30Z")

</div>

I created a script for SideNotes, it seems to work ok. It’s an example of how to use it, because SideNotes uses folders to organise notes, you may want to change the default folder in the New Item script.  
Also the Get Address script has a static title, I have not been able to retrieve the title of the current note, so this will need some work.

Get address script:  
tell application “SideNotes”  
set current\_note to current note  
set current\_folder to current folder  
set note\_id to id of current\_note  
set note\_title to title of current note  
set note\_url to “sidenotes://open/” & note\_id  
return “[” & note\_title & “](” & note\_url & “)”  
end tell

New item script:  
tell application “SideNotes”  
set f to first folder where name is “Quick Notes”  
set note\_title to “$title”  
set note\_text to “# $title  
$user\_link”  
set new\_note to make new note in f with properties {text:note\_text}  
set note\_url to “sidenotes:///open/” & id of new\_note  
set note\_id to id of new\_note  
open with id note\_id  
end tell  
note\_url

 ![Screenshot 2021-11-25 at 10.12.38](https://discourse.hookproductivity.com/uploads/default/original/2X/c/c7e0e7e1ce3c22862a3a61b87d88514fbd7ac8b6.png)  
 ![Screenshot 2021-11-25 at 10.12.44](https://discourse.hookproductivity.com/uploads/default/original/2X/5/51b679dd3b3760b94ab4c1802aa226e6e052decb.png)

---

<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:** [November 25, 2021, 7:01pm UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/4 "2021-11-25T19:01:45Z")

</div>

thanks for sharing! For now users could use “Rename” in Title menu or linked items menu to rename.

---

<div class="post-metadata">

**Author:** ![wernervp](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/w/34f0e0/32.png) [@wernervp](https://discourse.hookproductivity.com/u/wernervp)\
**Post date:** [November 26, 2021, 3:27pm UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/5 "2021-11-26T15:27:03Z")

</div>

I also contacted the developer and he has put the request on his todo list. He thinks it is already possible to make this work.

---

<div class="post-metadata">

**Author:** ![wernervp](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/w/34f0e0/32.png) [@wernervp](https://discourse.hookproductivity.com/u/wernervp)\
**Post date:** [December 8, 2021, 10:48am UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/6 "2021-12-08T10:48:38Z")

</div>

I have updated the script to the the link and title of the note. This needs the latest update from SideNotes to work because the developers fixed a bug with the Title property in AppleScript.

---

<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 10, 2021, 3:02am UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/7 "2021-12-10T03:02:35Z")

</div>

We’ve updated Integration to v. 191 for SideNotes. There’s a `Hook to New` script in there.

There’s code in there to deal with the folder. As far as we know, Hook has no way to get the folder name from Side Notes itself, yet to create new notes in Side Notes, the Side Notes API requires knowing the folder name . So Hook prompts the user the first time. After that, the folder can be changed from the Terminal. We’ll add some documentation once the dust settles.

If anyone tries it could they please let us know how it works for them?

---

<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, 2021, 6:15am UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/8 "2021-12-22T06:15:35Z")

</div>

This is now in Hook 3.4, with thanks to @wernervp mentioned in release notes.

If anyone is connected to the SideNotes community or dev, it would be great to share this with them. The two apps are a natural fit.

---

<div class="post-metadata">

**Author:** ![wernervp](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/w/34f0e0/32.png) [@wernervp](https://discourse.hookproductivity.com/u/wernervp)\
**Post date:** [December 22, 2021, 6:47am UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/9 "2021-12-22T06:47:34Z")

</div>

I have notified the developer that SideNotes is now part of the Hook integration. He will also be working on a few updates to make sure integration is improved. Like for example using the integrated way of choosing a folder to put a new note in.

The developer is very responsive, which is great!

---

<div class="post-metadata">

**Author:** ![wernervp](https://discourse.hookproductivity.com/letter_avatar_proxy/v4/letter/w/34f0e0/32.png) [@wernervp](https://discourse.hookproductivity.com/u/wernervp)\
**Post date:** [December 22, 2021, 7:01am UTC](https://discourse.hookproductivity.com/t/hook-for-side-notes/4139/10 "2021-12-22T07:01:39Z")

</div>

I have an updated new item script that asks for the folder to create a new note each time. I’m not sure which is preferable when choosing between the default Hook way or this way.

> tell application “SideNotes”  
> set note\_title to “$title”  
> set note\_text to “# $title” & return & “$user\_link”
> 
> – get all folders in SideNotes  
> set folder\_names to get name of every folder  
> set selected\_folder\_name to {choose from list folder\_names}  
> if selected\_folder\_name is equal to false then  
> set f to first folder where name is “Quick Notes”  
> else  
> set f to first folder where name is selected\_folder\_name
> 
> end if  
> set new\_note to make new note in f with properties {text:note\_text}  
> set note\_url to “sidenotes:///open/” & id of new\_note  
> set note\_id to id of new\_note  
> open with id note\_id  
> end tell  
> note\_url
