What is a Note object?

Several actions return a Note object. These are structured objects containing the following properties:

  • Vault: the name of the vault the note lives in
  • File Path: the full file path of the note, starting from the vault root
  • Front matter: the block of metadata the note may contain (excluding its --- boundaries)
  • Properties: the note properties as processed by Obsidian, i.e. a Shortcuts dictionary containing key/value pairs
  • Body: the note body, i.e. the file contents excluding any front matter
  • Content: the file contents in their entirety

Example

Suppose you have a note file newnote.md that contains the following:

---

tags: important, whatever

created_at: 2023-02-07T16:59:24Z

---


This is a note.

The related Note object's properties would be:

  • Content: the whole file, i.e. what you see above
  • Vault: Testbed
  • File Path: newnote.md
  • Front Matter:

tags: important, whatever

created_at: 2023-02-07T16:59:24Z

  • Properties:
    • tags : a list of strings, i.e. "important", "whatever"
    • created_at : the string "2023-02-07T16:59:24Z"
  • Body:

This is a note.

(Notice the leading line break here — whitespace is not trimmed.) And, lastly, "Content" would be the contents of the file, as is.

If the front matter contains a structure that Obsidian can't process, Properties will be empty, because that's what Obsidian will return in that case. For details on what's allowed and supported, please see the official Properties docs page.


How to access the Note properties

The Note object properties can be accessed and selected by clicking the object, for example after you have placed it in a text block or when you use it as a parameter of another action.

Screenshot of a Note object placed in a Text action, with its property selector overlay open


Changes / History

v1.4

  • Adds the Properties attribute
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.