Autolinking Notes that share Tags

Things I have tried

youtube/odyssee vids and searching the forums

I’m developing a workflow and right now I prefer to use new Zettlekast note w/ autogenerated title.

Let’s say I have 3 notes
a) hypothyroidism associated w/ weightgain (tagged #thyroid #weightgain)
b) diabetes’ association w/ weight gain (tagged #DM #weightgain)
c) thyroid storm (tagged #thyroid)

Now, I want to hit some hot key, and then note a: should have links to b &c, note b to a, and c to a.

I like the zettlekast prefix title b/c it’s neutral and the string of numbers doesn’t bias but it would be a pain if it have to type and find the correct note to link manually?

I understand I can search by tags, but I would also like to be able to follow a thought through the note’s links if that makes sense?

What I’m trying to do

1 Like

Not 100% what you asked. But are you aware that you can embed a search query directly in a note?


If you put this query in each of the tagged notes, you’ll have some auto-generated links to each of the tagged notes. If you add another tagged note, it will automatically show up in that query. (Unfortunately, this won’t generate graph links, which is maybe what you want.)

AND if you put that embedded search query underneath a header, you can also do a header link, and the embed will show up. So instead of adding the query to every single note, you could have a fake “meta” note that you use just to store all of your queries. And then just link to the header you need.

Then anywhere you want to link that tag search, you would just need a single line:

![[Meta Links Note#Weight Loss Tags]]

AND you don’t need a header. You can also do a block embed directly to the search query:

![[Meta Links Note#^3c3d31]]

Also I don’t use the Dataview plugin very much, but it can do even more powerful embedded queries. You can sort of set things up like a live dashboard or database.


Thanks for the reply. No I wasn’t aware that you could embed the query, and that’s a good work around. The graph is cool but I can live without the visual representation.

I’ll look up how to embed these Querries into the note. Do I need the Dataview plugin do what you did? when I typed ‘’‘query
it just showed the text.

Thanks again and happy holidays.

Nope no need for Dataview for this. Embedded searches are a core feature.

  1. You used single-quotes. You need to surround it by triple backticks. ```
  2. The last 3 backticks need to be on a new line. Not on the same line as your #weightloss tag.



This is helpful stuff, thanks

If you want to try out the dataview solution (which I prefer as it is much more configurable and leads to a more structured list of notes), cf. my solution here.

Keep in mind that this.file.tags[0] only lists notes that share your first tag. If your note contains several tags, you should extend your query as follows: this.file.tags[0], this.file.tags[1], this.file.tags[2] etc.


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