Template for new note with relevant content ie. title, date, etc?


I’m new to hook but I’ve been reading the forums and guides and I’m starting to get the hang of it after a couple weeks.

I’ve been trying out DEVONthink and EagleFiler, but I’m hoping that I can use Hook to mimic some of their functionality across more apps, without bringing them into the DEVONthink/EagleFiler library. The amazing feature offered by those two apps is the ability to attach notes to my files and link documents together. It seems like Hook has the same functionality.

I wish that new notes created with Hook could begin with some relevant information already on the page, like how new notes (called “annotations”) in DEVONthink begin with the title, date, x-callback-url, author, etc. How can I do this in hook? is it possible, and how can I accomplish this? I figured out how to add static text to templates, but that’s not what I want to do. I want the initial content of my new notes to be drawn from metadata about the source file.

I suspect it’s possible, because i’ve been able to string together a clunky workflow using basic hook commands. The output of “Copy Markdown Link” is basically what I want to appear on my new note. But it’s awkward to invoke Hook once, press ⌘M to copy markdown link, invoke Hook a second time, then ⌘N to make a new note, then ⌘V to paste the link. Its way too many key commands…

1 Like

some Hook to New scripts add a linkback: OmniFocus , Craft , Notes and Drafts come to mind. There’s a new item script for them.

One of the features in the pipeline is to extend the template mechanism to allow you to include variables, e.g., %date, %markdown-linkback , %URL. I don’t recall receiving requests for this (I’d have to check), but I wanted this and additional stuff like this.
Ditto for naming the new items – something that could be exposed on the Notes pane or a generic entry of the scripts tab. These are things in discussion here. There’s a matter of prioritizing – we are working on some big stuff that has been either explicitly requested or will in other ways address requests; and of course some other stuff that was not requested but we think will pleasantly surprise.

It would be great to be able to customize template note content. For instance, in Obsidian, one can create a new note by using the following template:

title: {{title}}

tags: ['']

created at: '{{date:YYYYMMDD}}{{time:HHmm}}'
completed at: 
modified at: 

# {{title}}

I would also be great if one can include something like {{date:YYYYMMDD}}{{time:HHmm}} in the note title to define a Zettelkasten style note title.

1 Like