Retrieve annotations for via Templater plugin (Hypothes.idian)

Install steps:

  1. Install Templater plugin in Obsidian
  2. Configure your templates folder in the templater settings page in “settings”
  3. Copy the text in the gist to a file in your templates folder for templater
  4. Now you can run that script (press ALT+E) and select the script you copied in.
  5. The first time it runs, it creates they Hyposthesis file for you with all the settings you need.

After that run the script and select the command you want.


Please see my other post to this thread with install steps. GIST is just a way to store files on the web and share them. Go to the gist page in the link, click on the “RAW” button, which shows you all the text you need and copy that a file in the templater templates folder.

1 Like

I didn’t realize using the template would “activate” the code. That’s what I needed to get it working. I obviously haven’t tested much yet but if I find issues, I’ll let you know.

This is absolutely fantastic. Thanks so much for sharing!

my pleasure. sorry i am new to templater as well. It is running the code in the file. lots happening there :slight_smile:

Ok, That’s How it’s done. Thank You @TfTHacker, for writing this script. It is very useful to annotate while you are reading something on the web and then Export it into Obsidian later. This way we don’t need to move back and forth from Obsidian and Browser to write notes.

1 Like

This is a great Templater script. Thanks, @TfTHacker.

1 Like

Hey peeps, fixed a bug today that the config file generated by this script can be stored any where in your graph, not just in the root folder.

1 Like

Great addition. I can’t say having it in root was bad, but it’s nice to tuck it away.

Thanks again for the script. I plan to wean myself off Zotero for those times when I don’t need a full blown reference.

1 Like

I’ve modified a portion of the template to better suit my own use. I’ve posted a Gist of my version for those who’d prefer it or would like an alternate example of an modification of the template section. Perhaps it may help those who are not as code-savvy puzzle out how they might make their own modifications?

The changes still keep all the relevant data fields, but reorder them and add a bit of formatting to fit the layout and the way I use my Obsidian notebook. In particular, I changed the formatting so that tags in are turned into [[wikilinks]] rather than #⁠hashtags as in the original. (The original also doesn’t do so well with multi-word tags in, which I use quite a lot.)


This is amazing. I didn’t know about, despite having tried a few of its “competitors”. I’m looking forward to playing with it and to have such an easy link to Obsidian will almost certainly make this my “go to” tool. Thank you for your efforts.

The only issue I’ve found with this plugin is if I have annotations on a local PDF file (using Chrome and the Chrome extension). It crashes. Remove any local PDF annotations and it works again. I’ve not been able to parse the JSON from yet to see what is fundamentally different.

Not a biggie for me - I generally host PDFs on the cloud - but just thought I’d mention.

Edit: Main difference seems to be the URI/Source which is a fingerprint of the local PDF: e.g. “uri”: “urn:x-pdf:a999faa94eb5eb4efefee1f1e1b519482”

This is beyond amazing! Thank you so much.

1 Like

Can we sort by tags ?

This is a great process. It would be good to include the step by step in your post and/or in the video. As a newbie to Obsidian and Mark Down, these help my note processing go much faster. Just wanted to say thank you!

1 Like

Hi David, I wanted to ask what cloud solutions one can use to achieve something like getting a raw PDF display in the browser. I am using OneDrive, but I don’t think it redirects you to / give you a raw pdf link in any way. Thanks in advance

There is also a plugin for this now:
weichenw/obsidian-hypothesis-plugin: An plugin that syncs highlights from Hypothesis.

Does anyone know a way to do this with my annotations on locally stored pdfs? That would be lovely.
I know I could probably move them to some cloud, but I have no idea which one could work (the most popular ones seem not to)

If you use Zotero, the following workflow may be of interest:

If you are on the macOS, PDF readers like PDF Expert can also extract highlights as Markdown:

If you are on the macOS and uses Alfred - Productivity App for macOS, the following workflow can also extract annotations:


I unfortunately don’t have mac, but I’ll surely check out the first one. Thanks a lot!:slight_smile:

You can drag and drop .pdf files from your computer into, which is a project built by, and that should allow you to be able to annotate raw .pdf files within your browser if they’re not hosted elsewhere.


If you’ve annotated local (private) files within your browser using, you’ll need to find the uri path (a rough equivalent to http address for web pages) for your .pdf file with its “fingerprint” (a long unique number).

To do this

  1. Visit View and export Hypothesis annotations
  2. Search for your username (and perhaps a tag) to find the document name and annotations you made on it.
  3. You should be able to click on the document title which will take you to a non-loading web page with an address that looks something like this:
  4. Copy and paste that address you get into Hypothesidian as the address for an appropriate option like “Retrieve my annotations for a web article or web pdf”.
  5. Hit enter/return.
  6. Hypothesidian should return the appropriate annotations for that document.

If others know of alternate/faster methods of finding URis for local pdf files I’d be happy to hear about them.