Using Readwise templates and the new properties feature

I’m trying to adjust the Readwise Obsidian export template (YAML front matter section) to include “date created” and “date updated” properties for my highlights notes. Unfortunately, the syntax I was suggested to use doesn’t seem to work in the properties.

Syntax suggested to me from a YouTube video prior to the rollout of properties produces this result in my notes:

I manually changed the property type to “date”:

I also tried editing the syntax in the note manually to the following, which did not help either:

Note Created: <%“yyyy-MM-DD HH:mm”) %>
Last Modified: <% tp.file.last_modified_date(“yyyy-MM-DD HH:mm”) %>

Could anyone help me with syntax that would work with the properties plugin?

In a template note, a Templater template in this case, don’t worry about the type mismatch in the Properties UI.

You should switch to Source mode to view the template note and make changes to the YAML if need be. The <%“yyyy-MM-DD HH:mm”) %> parts will be converted to dates once the template is run.

This works as well:

Apologies, I am unfamiliar with Templater. Is this a separate plugin I need to use in order for this to work? The template I’m referring to is something in the settings of the Readwise page, not Obsidian itself. So there isn’t a template file in Obsidian as far as I know of. I’m actually not sure where the script runs or how.

I don’t use Readwise myself, so hopefully someone can jump in, but the <%"yyyy-MM-DD HH:mm") %> sections are Templater syntax, so you’ll need the Templater plugin if you want to use that in your note.

1 Like

The Official Readwise plugin does not allow for interaction with local templates, so you can’t embed those template statements ( …). You can only use what Readwise allows you to use in it’s Jinja template for the plugin.

This is one of the reasons I left Readwise, they have not updated the Obisidian plugin in nearly two years.

There are other Readwise plugins that may allow for what you seek.

1 Like

Thank you, good to know!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.