Auto-Creating Page from Link with template

What I’m trying to do

I have a weekly journal template with generated links to (non-existent) weekly meetings.
I also have a meeting template I’d like to use for those meetings.

E.g. something like that:
[[Meeting — Weekly Standup 02.13.24]]

However, I’d like creating those notes by simply clicking on the link and setting a corresponding template in motion when I click.

How could I do that?

Things I have tried

Currently, I create a meeting from the template, and then the link works.

To get a newly created note from a link to use a specific template I see two options:

  1. Create the link with reference to a given folder, and use Templater with folder templates. (Sometimes you could also use the “create file in same folder” which could have the same template applied to it already )
  2. Have part of the name of the link locked to something specific, and then use Templater template to detect that part of the file name and apply a suitable template to the newly created file (and potentially move it to its proper folder)

If you could switch it around, you could possibly use some suggester to select which kind of file you want to create, and then create a file with the proper template at the proper location, and insert the link to that file as the last step. (This way you would create the note before the link, and you’ll have slightly better control as you could then allow for all kinds of names to be used).

Thanks for a quick answer!
Can you give a bit more detail on N2? I am playing with option 1 right now but it seems less suitable

When you create the file from a link it gets the name from the link, so that means that the tp.file.title is already set, and you could use javascript to check whether it starts with something, or has some other reference in it, to indicate what kind of file you want to create.

And now that you know what file type to create you could either have this template do all the work, or use await tp.file.include() to apply a template. Afterwards you could then do an await tp.file.move() to move it to the correct folder. So you’ll get to be good friends with the tp.file functions !

1 Like

Thank you!