I created this code to automatically create daily/weekly/monthly/yearly notes.
Every time you open Obsidian it will check if there is already a file for the day/week/month/year using the patterns and folder path you give, and if there isn´t, it will automatically create one.
You can also use Templater’s “Folder Templates” to automatically apply the templates you need for each file.
I find this amazing. Though, I run into an issue every time I try and use the startup template. I work on Mac. Maybe the problem is that I need to change some piece of code to adapt it to Mac and I am not familiar with javascript.
So the error I run into most of the time seems to be a path problem. Instead of going into the path I set as “Journal/DailyNote”, for example, the function goes into the templates folder and there it looks for the path I define. Doing so, it doesn’t recognise the path I defined and therefore creates that path inside the templates folder. In addition, the folder templates I defined for each path sometimes work and sometimes don’t.
Here below the code I am using in my TemplaterStartup:
An update on my problem. I understood that the main problem in the behaviour of my periodic note startup is that it goes and check the last folder I had opened before closing obsidian. Does anyone has a suggestion on how to fix this?
Thank you so much for this - my use of Weekly and Quarterly notes was hit or miss because I would forget to create them. Now they are just sitting there waiting for my input - this has been the push I needed! Thanks!