This object is a static snapshot of an Obsidian note. It is returned by several actions, such as Get Note or Set Note Properties.
This is a structured object and contains the following accessible attributes (also called "properties"):
Property | Type | Notes | Since |
---|---|---|---|
Vault | Vault | The note's parent vault. | |
Title | Text | v2024.2 | |
File Path | Text | The full file path of the note, starting from the vault root. | |
File Name | Text | v2024.2 | |
UID | Text | The note's unique identifier, if it has one. Blank otherwise. | v2024.2 |
Link | Text | The Obsidian link of the note. | v2024.2 |
Text | The block of metadata the note may have, excluding its --- boundaries. | ||
Properties | Dictionary | Obsidian's note properties. | |
Content | Text | The file contents in their entirety. | |
Body | Text | The note body, i.e. the file contents excluding any front matter. |
Example
Suppose that in your vault "Workbench" you have a note file subfolder/newnote.md
that contains the following:
The related Note object's attributes would be:
- Vault: "Workbench"
- Title: "newnote"
- File Path: "/subfolder/newnote.md"
- File Name: "newnote.md"
- UID: "01ARZ3NDEKTSV4RRFFQ69G5FAV"
- Link: "obsidian://open?file=subfolder/newnote.md&vault=Workbench"
- Front Matter:
- Properties:
tags
: A list of strings, i.e. "important", "whatever"created_at
: The string "2023-02-07T16:59:24Z"uid
: The string "01ARZ3NDEKTSV4RRFFQ69G5FAV"
- Content: The whole file, i.e. what you see above
- Body: (Notice the leading line break here – whitespace is not trimmed.)
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. Furthermore, see the examples section on the page for Get Note Properties on how to work with note properties.
How to access an object's attributes
Any object's attributes 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.