Supercharge your Obsidian Daily Notes

A journal with a fancy fountain pen.

I love journaling. It’s a great practice to get into, and it has numurous benefits. But why journal in Obsidian? For me, it comes down to the extra systems that you can build on top of your Obsidian Daily Notes.

  • Want to easily see notes from previous years? You can do that.
  • Want to see the last time you talked to your best friend? You can do that too.
  • Want to be able to look back at what you were thinking about a few weeks, months, or years ago? You can even do that.

There’s so much you can do with Obsidian that just isn’t an option with any other tool. That’s a big reason why you might want to consider journaling in Obsidian.

So without further ado, here are a few of my favorite systems for Obsidian Daily Notes.

Note: in order to implement these snippets, you’ll need to be familiar with community plugins in Obsidian and Dataview specifically.

Building an “On this Day” feature

Part of the fun of journaling is seeing your past journals, and admiring the progress that you’ve made. To do that, I built a little “On this day” feature that simply surfaces old journal entries that match today’s date. This uses DataviewJS (you’ll need to enable this in your Dataview settings), so it’s a little complicated. But if you use the default Daily Notes setup, you should be able to just copy and paste:

```dataviewjs
// set your own minimum year and the path to your journals (if applicable)
const minYear = 2012;
const journalPath = 'Areas/Journals';

const rangeOfYears = (start, end) => Array(end - start + 1)
  .fill(start)
  .map((year, index) => year + index);
const d = moment();
const currentYear = d.year();
const availableYears = rangeOfYears(minYear, currentYear);
const month = ("0" + (d.month() + 1)).slice(-2);
const day = ("0" + (d.date())).slice(-2);
const dateString = month + '-' + day;

availableYears.forEach((y) => {
	var note = dv.page(`${journalPath}/${y}-${dateString}`);
	if (note) {
		dv.el('span', `[[${note.file.path}|${y}]] `);
	}
});
```

This will spit out links to journals created on this day. You may need to adjust the “minYear” variable if your journals go back further than 2012, and you may need to add a path to your journals if they aren’t in your root folder. An example path is provided in a comment below the “journalPath” variable.

This snippet isn’t intended to go in your Daily Notes, rather it’s meant for a note you reference every day. I use my Today view, but a home note would work just as well. It looks like this:

A screenshot of my "On this day" feature, including links to six different years of journals.

(You can hover over the links to see the note contents without opening the note)

Keeping track of your relationships

One helpful aspect of journals is your ability to track your interactions with other people. I have a hard time remembering what I talk about with other people, so I like to keep track of it. That way the next time I talk to them, I can bring up a past conversation without too much effort.

To track my relationships, I first create a new note for the person I’m trying to track. Let’s say I had a good conversation today with John Doe, I would create a note like this:

---
aliases: ['John D']
---
[[People MOC]]
%% #person %%
# John Doe
Birthday:: null

Married to [[Jane Doe]].

## Likes
Adventure, hiking, camping, eating, good beer.

## Mentioned
```dataview
list from "Journals" and [[]]
```

This is a pretty simple template, feel free to add or remove as you desire.

The interesting bit is the small Dataview script below the “Mentioned” header. This script will pull in any journal entry that mentions John Doe, which gives us an extremely convenient way to keep track of our interactions with John. (although note that the script looks for journals in a folder called “Journals”, you may need to change this if your journals exist elsewhere)

As for the name of the note, some people like to prefix people’s names with an “@“ symbol, e.g. [[@John Doe]]. This does help with autocomplete, but I don’t find it necessary myself. Feel free to do whatever you prefer.

Whatever you decide to name the note, that’s what you will use in your journals to keep track of this person. For example, “Saw [[John Doe]] today, had a good chat about squirrels…”

Then in the John Doe note, those references will show up in an easy to parse list, like this:

  • 2022-10-01
  • 2022-10-12
  • 2022-11-01

Tracking Notes Created On This Day

Sometimes journals are hard to look back on because they lack context. This tip is another reason why Obsidian is so good for journaling: the more you use Obsidian, the better it becomes for journals.

I like to create Zettelkasten-style Atomic notes in my vault. If you do that too, then Dataview makes it pretty easy to add a list of those notes to your daily note.

```dataview
LIST
FROM !"Journals"
WHERE file.cday = date({{date:YYYY-MM-DD}})
```

Note: for this to work, you have to be using the core Daily Notes plugin and the core Templates plugin.

If you add the above snippet to your Daily Notes template, then your daily notes will automatically fetch a list of all the notes created on that day.

The !"Journals" line excludes your journal entries, just to clean up the output a bit. Feel free to change that to exclude any folders that you don’t want to show up in this list.

Tracking Completed Tasks in Your Obsidian Daily Notes

If you use the excellent Tasks plugin, it’s equally easy to track completed tasks in your Daily Note. This snippet uses the Tasks Query Language, and if you add this to your Daily Note then Tasks will pull in all tasks that were completed today:

```tasks
done on {{date:YYYY-MM-DD}}
```

Conclusion

These are a few of the systems I’ve found to be helpful in conjunction with Daily Notes in Obsidian. If you try them, let me know how they work for you! Or, if you have ideas for other helpful systems, I’d love to hear those too.

4 responses to “Supercharge your Obsidian Daily Notes”

  1. Hey, thank you for this article, it gave me some nice ideas on how to improve my own ways of journaling.

    However, I had a hard time implementing the “On this day” snippet in my own system. Even after setting my own parameters (for the path and the year), I still got syntax errors (I don’t know if these are due to updates in the way DataviewJS works or what else). I spent a bit of time trying to find a way to make it work for me, so here it is:

    “`dataviewjs
    // ! remember to put your year and path parameters here
    const minYear = 2022;
    const journalPath = ‘Journal/Daily’;

    const rangeOfYears = (start, end) => Array(end – start + 1)
    .fill(start)
    .map((year, index) => year + index)

    const d = moment();
    const currentYear = d.year();
    const availableYears = rangeOfYears(minYear, currentYear);
    const month = (“0” + (d.month() + 1)).slice(-2);
    const day = (“0” + (d.date())).slice(-2);

    // ! remember to format your date properly
    const dateString = day + ‘-‘ + month;

    for (y of availableYears) {
    var note = dv.page(`${journalPath}/${dateString}-${y}`);
    if (note) {
    dv.el(‘span’, `[[${note.file.path}|${y}]]`)
    };
    }
    “`

    Hope this can help!

    1. Hi Giuseppe! Glad you liked the article.

      There are a few minor issues with the code above. And unfortunately WordPress escaped a bunch of the characters in your code, which makes it hard for me to tell what the real issue is.

      Let’s try this in a more code-friendly environment: I think I’ve fixed them in this gist, can you try it out and let me know if it works for you? https://gist.github.com/WebInspectInc/d0fb466cbe87778255b188f3508a52bd

  2. Thanks for this article as it gave me pointers to achieve my goal of having a daily note in Obsidian replicate what I know how to do in Notion !
    I tried the code provided in your reply to Giuseppe but can’t seem to make it work even though I updated – I think – everything to match my system. I don’t even get syntax error,
    Maybe there’s something wrong with my dataviewJS settings ? I’ll keep digging of course, but any help would be appreciated 🙂

    // update path and minyear if needed
    const journalPath = 'CALENDRIER\Daily Notes';
    const minYear = 2015;
    const d = new Date();
    const rangeOfYears = (start, end) => Array(end - start + 1) .fill(start).map((year, index) => year + index);
    const availableYears = rangeOfYears(minYear, d.getYear() + 1900);
    const month = ("0" + (d.getMonth() + 1)).slice(-2);
    const day = ("0" + (d.getDate())).slice(-2);
    const dateString = month + '-' + day;
    availableYears.forEach((y) => {
    // you may also have to update this date string, if your files aren't formatted in the default way (YYYY-MM-DD)
    var note = dv.page(`${journalPath}/${dateString}-${y}`);
    if (note) {
    dv.el('span', `[[${note.file.path}|${y}]] `);
    }
    });

  3. Can you please share the [[People MOC]] file setup also. Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *