Returns a specific note.
The note is returned as Note, which gives you access to the entire contents of the note file, as well as just its body, front matter, and file path.
This action will throw an error if the specified note doesn’t exist, so it’s best to use it after the “Check For Existence Of Note” action has determined that it does exist.
Parameters
Vault
The vault to work in.
Type: Vault reference
Strategy for finding the requested note
The note can be looked up either by its full path, or by its title (without the path).
“at file path” should be used if you already know the full file path (including folder and file extension).
When selecting “with title”, the lookup will try to find the note by its given title. If there are several folders containing a note with the given name, AFO will select the first one after sorting them by a given criterion:
- “let Obsidian decide”: default, is akin to adding the Markdown code
[[My Note]]
and counting on Obsidian to pick the right file. - ”select oldest (by creation time)"
- "select newest (by creation time)"
- "select oldest (by modification time)"
- "select newest (by modification time)"
- "select first by full path”:
Folder A/My Note
would be chosen overFolder B/My Note
. - ”select last by full path”
Options:
- at file path
- with title
Note Path or Title
Enter either the file path of the note or its title; the action will use the value of this field depending on the switch “Strategy for finding the requested note”.
Type: Text
In case of duplicates …
If there is more than one note with the given name, AFO will select the first one after sorting these notes by a given criterion.
Options:
- let Obsidian decide
- select oldest (by creation time)
- select newest (by creation time)
- select oldest (by modification time)
- select newest (by modification time)
- select first by full path
- select last by full path
Open or focus note
If enabled, after a successful operation, the note will be brought to the front in Obsidian.
Type: Boolean (YES
/NO
)
Return Value
Related Links
- Search the Actions for Obsidian community forum for "Get Note"