Is There a Way to Create Nonexistent Files as Unique Notes in Obsidian?

Hello, I’m using Obsidian and have a specific question. Is there a way to automatically create nonexistent files as unique notes when they are referenced? I believe having this feature would allow for a smoother assembly of linked thoughts and ideas. If anyone knows how to set this up, I would greatly appreciate your guidance. Thank you!

If you type a link to a note which doesn’t exist, it’ll be created when you hit the link. Is this what you are asking about?

To me, your actual issue is not clear. As soon as you link to a nonexistent file, that reference is unique. The reference now exists in the vault: you can link to it from other notes and the nonexistent file will appear in the search for links (after typing [[). The file will be created physically the moment you click a link to it.

Thank you for your reply!
Sorry for not being clear enough.

I’m using the “Unique note creator” to create unique notes. When clicking on links to files that haven’t been created yet, I would like to follow the flow of the “Unique note creator” to create those notes.

Of course, after creating a file with the “Unique note creator,” I could manually replace the links with those to the newly created files, but that would be a tedious and boring task…

Thank you!

There are 3 elements to the Unique note creator:

  1. Filename. If you have a non-existent link to [[epistemology of apple pie recipes]]. And if you click that link, do you want that link name to be replaced with your Unique Note template, [[202402261227]] (or whatever format you have in settings)? And if not replaced, are you imagining just to keep the existing link title?
  2. Templates - If this is the important part, consider template and macro plugins.
  3. Location - This can probably be managed with template, mover, and macro plugins too.

The main feature of Unique Notes is the generation of the automatic unique filename. The template and location can likely be managed better with different plugins. “Templater”, “Auto Template Trigger”, “Commander” or other template/macro plugins.

I agree, that would be tedious! The fact that you listed this as a workaround makes me think you might not be aware that you can trigger templates by command. So if for some reason you don’t want to install a community plugin, you can still trigger the creation of one of your templates with Templates: insert template.

So instead of manually replacing links, that workflow would be:

  1. Follow the link to create the note
  2. Run a command or hotkey to insert a template. (Again, a template plugin might make this even more easy.)

Thank you for your reply.

After doing some research, I found out that I could achieve what I wanted by using Templater.

Specifically, I use Templater’s Folder Templates feature to trigger a unique note template when creating new notes in Obsidian. The important thing is that Templater allows the use of JavaScript, which means I can differentiate whether a new note was created directly or from a link to a nonexistent file, based on the file title, allowing me to create notes through the exact same process.

Ideally, it would have been nice if it could set the original text as the display text, like [[202402261227|epistemology of apple pie recipes]].

However, I think the outcome was satisfactory.

Thank you for the advice!

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