Tag preservation: Readwise Reader export > Obsidian > DT

Hi - I’ve been using Readwise Reader pretty extensively, and have several thousand articles saved there. I have been struggling to use them for research. I found out recently that it is possible to export not only Readwise highlights, but entire Readwise Reader articles to Obsidian via the official Obsidian plugin, and was hoping to use this to get all of this into Devonthink for research purposes by then indexing my Obsidian folder. (Note that I am not yet a serious Devonthink users, but hope to remedy that - and don’t really use Obsidian at all.)

Here is my situation:

There are hundreds of random #hashtags found in the original exported documents, which are showing up in Obsidian as tags. No interest in retaining those in Devonthink.

Each article does have a metadata section in the markdown, which looks like this sample:

## Metadata
- Author: [[Terribleminds]]
- Full Title: A Small but Vital Thing, Taken
- Category: #articles
- Document Tags: [[Mental Health]] [[writing]] 
- Summary: The author explains that quiet downtime is essential for creative thinking and writing. However, constant exposure to overwhelming and toxic news makes it hard to find that mental peace. They struggle to protect their mind but still try to manage and seek advice from others facing the same challenge.
- URL: https://terribleminds.com/ramble/2025/06/24/a-small-but-vital-thing-taken/

It also looks as if I can optionally add YAML frontmatter to my Readwise export - maybe this is the way? If so, it would be great to get a sense of what I need to do here, as the default YAML is blank. What would my ideal YAML look like for Devonthink?

Variables: {{title}}, {{full_title}}, {{author}}, {{url}}, {{category}}, {{image_url}}, {{date}}, {{time}}, {{last_highlighted_date}}, {{published_date}}, {{summary}}, {{source}} (e.g. kindle, pocket)

I would like to point Devonthink at this Obsidian folders to index it. What is my best bet to:

  • Ignore hashtags in the article body? (I suppose the category in frontmatter is OK)
  • Have Devonthink interpret the document tags as Devonthink tags?

I am open to running a script either from within Devonthink, or on my entire Obsidian directory, if I need to rework the markdown for easier ingestion. (I don’t plan on using this material in Obsidian itself - it’s just a conduit from Readwise Reader to Devonthink.)

Many thanks for any pointers - I apologize if this is obvious, but I’m just getting starting with Devonthink and don’t want to get off on the wrong foot.

1 Like
  • If you’re not using Obsidian, what’s the point in indexing an Obsidian vault?

  • If you don’t want hashtags automatically converted to tags in DEVONthink, disable its Settings > Tags > Import: Convert hashtags to tags.

  • Have Devonthink interpret the document tags as Devonthink tags?

Assuming you’re referring to the YAML Document Tags, this won’t happen automatically.

2 Likes

I am using Readwise’s Obsidian export to get a folder of Markdown files to import into Devonthink. It looks, actually, as if I can add YAML frontmatter to those Markdown files. If I then enable “Convert hashtags to tags”, Devonthink will import the YAML tags as if they were hashtags.

My only issue at this point is figuring out how to remove the actual hashtags found in the article bodies, as the checkbox imports both of them.

I’m going to see if I can run them through a regexp via bbedit or some other tool that will remove hashtags while preserving markdown headers (which also begin with #). Failing that, I guess I can manually remove a bunch of tags once the article make it into Devonthink but I’d rather avoid that.

  • Tags in this frontmatter won’t be converted to DEVONthink tags unless they are singular and prefixed with #, e.g., #This_isATag. #New York City is not a valid hashtag. This would yield one tag: #New.

  • Your frontmatter is showing WikiLink syntax. The square brackets need to be scrubbed on the import as I’m guessing you don’t want your tags to include them.

  • Markdown section heading being with # Heading. There is no space in a hashtag.

Interestingly, #1 is not true. In my YAML frontmatter, for example, I have the line:
tags: readwise, articles, ai, education, ai-writing, ai-cognition, tech and society

and on import, “tech and society” is showing up as a single tag in Devonthink.

  1. As seen above, the YAML section (not the Obsdian-specific Metadata section) does not have WikiLink syntax.

  2. Yeah, this was key - I used a varient of this criterion to escape all hashtags that were not at the beginning of a line (markdown headings) or not preceded by a space (part of a URL fragment) - this worked perfectly.

Now just working on getting other metadata into DT custom fields, which looks doable.

That is not what you provided in your example.

PS: The tags shown in this new example aren’t actual hashtags but do respond to the Convert hashtags to tags setting.

You’re talking about front matter variables here. @BLUEFROG was talking about hashtags. Apples, oranges.

You’re right, that was not in my original example - since there, I found a way to also add YAML frontmatter (mentioned in my second message), so I thought you were discussing YAML frontmatter, not the Metadata section in my original post. Sorry for the confusion.

1 Like

Gotcha. It’s good Readwise has provided robust enough mechanisms to provide cleaner metadata. The other syntax was possible to script but not having to script a solution is better.

Yeah - the hashtag language in the settings threw me - filed an enhancement request to split out hashtag and frontmatter import, or at least label more accurately. I imagine this is an extremely low priority, but worth a shot.

Brett Terpstra wrote a script to pass Readwise highlights direct to DEVONthink: Readwise highlights to DEVONthink - BrettTerpstra.com. I haven’t tried it, but it might be of interest to those who want to do such things.