Obsidian Vault REST API icon

Obsidian Vault REST API

Interact with Obsidian Vault via REST API

Overview

This node interacts with an Obsidian Vault via its REST API, specifically allowing you to upsert (create or update) notes within the vault. The "Upsert Note" operation is useful when you want to programmatically manage your markdown notes by specifying their path, front matter metadata, and content. This can be beneficial for automating note-taking workflows, syncing external data into your vault, or maintaining structured documentation.

For example, you could use this node to:

  • Automatically create meeting notes from calendar events.
  • Update project documentation stored as markdown files with new information.
  • Sync notes from other applications into your Obsidian vault.

Properties

Name Meaning
Path The file path of the note within the vault. This determines where the note will be created or updated.
Front Matter JSON object representing the YAML front matter metadata of the note. Used to store structured data like tags, aliases, dates, etc.
Content The main body content of the note in markdown format.

Output

The node outputs JSON data representing the response from the Obsidian Vault REST API after the upsert operation. This typically includes details about the created or updated note such as its path, content, and metadata.

If the node supports binary data output (not evident from the provided code), it would represent file contents or attachments related to the note.

Dependencies

  • Requires access to an Obsidian Vault REST API endpoint.
  • Needs an API host URL configured in credentials or environment variables.
  • Optionally requires an API authentication token or key to authorize requests to the vault.

Troubleshooting

  • Common issues:
    • Incorrect or missing API host URL leading to connection failures.
    • Invalid JSON in the "Front Matter" property causing parsing errors.
    • Specifying a non-existent or invalid path may cause the API to reject the request.
  • Error messages:
    • Authentication errors if API credentials are missing or invalid.
    • Validation errors if required properties like "Path" are empty.
    • JSON parse errors if the "Front Matter" input is not valid JSON.
  • Resolutions:
    • Verify API host and credentials configuration.
    • Ensure "Front Matter" is valid JSON.
    • Provide a valid, correctly formatted path for the note.

Links and References

Discussion