Overview
This node interacts with Obsidian notes by reading or writing their frontmatter metadata. It is useful for automating the management of note metadata in Obsidian vaults, such as updating tags, dates, or custom fields without manually editing the markdown files.
Common scenarios include:
- Reading the frontmatter of a specific note to use its metadata in workflows.
- Updating or adding new frontmatter fields to an existing note programmatically.
- Integrating Obsidian notes with other tools by extracting or injecting metadata.
For example, you can read the frontmatter of a note named "project.md" to retrieve project status and then update it based on external data.
Properties
Name | Meaning |
---|---|
Operation | Choose between "Read Obsidian Note" (to get frontmatter) or "Write Obsidian Note" (to update frontmatter). |
Filename | The path or name of the Obsidian note file to read from or write to. |
Values To Save | (Only for Write operation) A JSON object string representing key-value pairs to merge into the note's frontmatter. |
Output
The node outputs an array containing one JSON object representing the note:
frontmatter
: An object containing the parsed frontmatter metadata of the note.content
: The main content of the note excluding the frontmatter.
If the operation is "read", this output reflects the current state of the note. If "write", the output reflects the note after merging the provided values into the frontmatter.
No binary data is output by this node.
Dependencies
- Requires access to the Obsidian note files via the filesystem or a shared module that handles reading and writing notes.
- Uses helper functions (
getNote
andwriteNote
) from a shared dependency to parse and update notes. - No external API keys or online services are required.
Troubleshooting
- Invalid JSON in "Values To Save": When using the write operation, ensure the JSON string is properly formatted (e.g.,
"key":"value"
pairs inside braces). Malformed JSON will cause parsing errors. - File Not Found: If the specified filename does not exist or is inaccessible, the node may fail to read or write the note.
- Permission Issues: Ensure the workflow has permission to read/write the note files.
- Empty Filename: Providing an empty filename will likely result in an error or no action.