Automatically insert birthday callouts for people's birthdays in your daily notes:
Edited 19/09/2022: Changed the alias part to use the updated structure (removed values
)
Make sure you have the following plugins installed and enabled:
- Daily Notes
- Templater
- Admonition → for creating a custom callout
- Dataview → enable JavaScript queries
- Create a custom callout in the Admonition plugin settings:
- Create notes for each person's birthday with the file name as the person's full name
- In the YAML frontmatter, put the following:
--- birthday: YYYY-MM-DD alias: [Nickname 1, Nickname 2, and so on] ---
- Feel free to add more info in your notes about the person, but only the above two is required. I use aliases so that nicknames will be shown instead of their full names. You can change it to display the file name instead by changing a variable value (step 6).
- Create a template note in the folder location Templater uses and insert the following code (scroll down to the next file in the gist). This is slightly modified from DataviewJS Snippet Showcase - #6 by Moonbase59 - Share & showcase - Obsidian Forum
- Set
isAlias
tofalse
if you would like to use the file name instead of the alias. - Change variable
dir
to the value of your CRM directory. Format:'"insert/directory/here"'
(double quotes surrounded by single quotes). - Insert the above template note in your Daily Notes template, like so:
Again, don't forget the double quotes.<%-tp.file.include("[[Birthday template]]")%>
- Create a daily note. If a person in your CRM has a birthday, a callout should be generated, linking to that person's note.