Prepends text to a note, either to the very beginning of the note (default) or to the section below a particular headline in a note.
Parameters
Vault
The vault to work in.
Type: Vault reference
Note Lookup
Specify which note should be looked up or manipulated by the action:
- "note": If you want to use another AFO action’s Note result, pick this option.
- "note at file path": The full path of the note, should be used if you already know the full file path (including folder and file extension).
- "note with UID": Use this if you are using unique identifiers for your notes, and you prefer to look them up by the UID.
- the current Periodic Note (daily, weekly, etc.)
Options:
- note
- note at file path
- note with UID
- Daily Note
- Weekly Note
- Monthly Note
- Quarterly Note
- Yearly Note
File Path
The path of the note, relative to the vault root.
Only available when Note Lookup is set to "note at file path".
Type: Text
UID
The unique identifier of the note. To configure the frontmatter key that is used for the lookup, go into Obsidian's settings, section "Community plugins", and find Actions URI.
Only available when Note Lookup is set to "note with UID".
Type: Text
Obsidian Note
A Note that was returned by another AFO action.
Only available when Note Lookup is set to "note".
Type: Note reference
Text
The text to prepend to the note.
Type: Text
Headline
The headline must be entered exactly as it appears in the note: headline levels, capitalization, punctuation etc. For example, ## My Headline
, ### My Headline
, and ## my headline
are not identical.
Only available when Placement is set to "beginning of the section below the headline".
Type: Text
Placement
Where to prepend the text.
Options:
- beginning of the note
- beginning of the section below the headline
Ignore frontmatter
If enabled, the text will be added to the top of the note, before any frontmatter.
Only available when Placement is set to "beginning of the note".
Type: Boolean (YES
/NO
)
Ensure newline
If enabled, a line break will be added to the inserted text if it does not already have one. Useful if you have a piece of text that does not have a line break at the end, but should.
Type: Boolean (YES
/NO
)
If headline is missing
When adding text below a headline, and the requested headline is missing, what should happen?
Only available when Placement is set to "end of the section below the headline".
Options:
- Show error
- Add headline
- Do nothing
Create note if necessary
If enabled, the note will be created if it doesn't exist so text can be appended.
Type: Boolean (YES
/NO
)
Open or focus note
If enabled, after a successful operation, the note will be brought to the front in Obsidian.
Type: Boolean (YES
/NO
)
Related Links
- Search the Actions for Obsidian community forum for "Prepend Note"