I feel like I am super close, but I’m at a loss on what I should do next
What I’m trying to do
As a user of a Daily Note
I would like to simplify my Standup notes by having access to create a new note populated from Templates/StandupTemplate
, from within my Daily Note
I’d like Standup notes to be
- linked to my Daily Note
- populated with a pre-defined template
- opened when I click a create button (or something like that)
- assigned a filename like
Standup 2024-01-30-Monday
So that I can have meeting notes linked in my Daily Note opened a new note, in a new tab, with a single click
Things I have tried
An Attempt
I tried embedding a link that doesn’t exist yet. This would give me the ability to only create the Standup note file on days I want. Ya know, like only on work days
![[Standup <% moment().format('YYYY-MM-DD-dddd')]]
No luck here. I mean, this is part of the functionality I was hoping for, but lacks in having a pre-defined template
Part Way There?
There was a half step before the next attempt, where I tried to just use the file path to the template, but that didn’t seem to work
Another Attempt
Looking at docs, creating a new file is possible
It should be tp.file.create_new(template, filename, open_new, folder)
I’m unsure what I am doing wrong here, but it seems like I’ve assigned arguments appropriately.
I tried a few variations before getting what I think is the right way to do it. Still not much luck with
<%* await tp.file.create_new(
tp.file.find_tfile("Templates/StandupTemplate"),
moment().format("YYYY-MM-DD-dddd"),
true) %>
Still, the console is showing
Templater Error: Template parsing error, aborting.
Destination file already exists!
and
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'path')
at eval (plugin:templater-obsidian:3744:90)
at Array.find (<anonymous>)
at Templater.get_new_file_template_for_folder (plugin:templater-obsidian:3744:59)
at Templater.on_file_creation (plugin:templater-obsidian:3764:47)
For reference, the only folder I have is Templates
. Everything else is free-range