UUID for note links in URL scheme

The command I use is Ctrl/Cmd-P, “Copy URI For Current File”

That will automatically add the uid field to the note’s yaml frontmatter and copy a link like this to your clipboard in one action.

obsidian://advanced-uri?vault=notes&uid=72041b15-45cd-4261-859b-08e45c089f3f

There are some other advanced URI commands, but I use that one the most.

The docs are a little thin on details, but worth a look.

5 Likes

can you not just set a hotkey for the command in the settings under Hotkeys?

To expand slightly on Val’s “put IDs in body and search for them” method (UUID for note links in URL scheme - #34 by Val & UUID for note links in URL scheme - #38 by Val), Obsidian URLs have a search action you could use with unique in-body IDs instead of using the open action with the note’s name.

1 Like

Use case or problem

I want to be able to link blocks with unique ids. obsidian blocks do not have unique ids

This means that the block cannot be moved between different files, and once it is moved, all links to the block will break

Because whether the link comes with ob or is generated by the Advanced URI, the link of the block is based on the body of the file

As A result, a block cannot be moved from document A to document B during information reconstruction without all related links breaking

Blocks cannot flow smoothly between documents, so it is necessary to ensure that all blocks are established in a document in a library at the beginning

This link structure makes it difficult to reconstruct later notes

Proposed solution

Make links based on unique ids, not based on libraries and files as upper-level paths

For example, obsidian://open? vault= block ID

Instead of obsidian://open? vault= library name &file= folder name %2F File name

Also non-obsidian ://advanced-uri? vault= library name &block= block ID&uid= file ID

3 Likes

Conclusion:

Allows files and nodes to have a unified ID

Opinion:

The smallest unit of information can be a block

The file is just a bigger block

Files and blocks should have a completely uniform form of ID

This makes it easy to reconstruct the information and let all the information flow between files

A file can also be a child block of another file