Files
daniel156161 fa766f5354
Build and Push Docker Container / build-and-push (push) Successful in 4m27s
feat(obsidian): add property frontmatter commands
- Expose Obsidian CLI property commands via the n8n Obsidian API node
- Add a new Property resource with operations: Set, Read, Remove, List
- Implement correct args mapping for property:set/property:read/property:remove/properties
- Return raw CLI stdout for property read/list for easier downstream parsing
- Update node README with frontmatter/property usage examples
- Bump package version to 0.2.5
2026-06-24 12:57:28 +02:00

108 lines
2.5 KiB
Markdown

# n8n-nodes-obsidian-cli-api
n8n community-node package for the Obsidian API Docker service.
It talks to the HTTP API, which then runs the **official Obsidian CLI** against mounted vaults. The node sends structured `args` arrays only. It does not send shell commands.
## Nodes
### Obsidian API
Resources:
- **Note**
- Create
- Read
- Append
- Prepend
- Delete
- Rename
- List Files
- **Property**
- Set
- Read
- Remove
- List
- **Daily Note**
- Append
- Prepend
- Read
- Path
- **Search**
- Search
- Search With Context
- **Vault**
- Info
- List Vaults
- **Raw Command**
- Safe args-array escape hatch for any official CLI command
## Credentials
Credential type: **Obsidian API**
Fields:
- **Base URL**: URL of your Obsidian API service, e.g. `http://localhost:8080`
- **API Token**: JWT created with `scripts/create_jwt.py`
- **Default Vault**: optional, e.g. `work`
## Multi-vault
Set the `Vault` field on a node to override the credential default vault.
The node sends this as the official CLI prefix:
```text
vault=work
```
Raw command example:
```json
["vault=work", "read", "path=Inbox/Note.md"]
```
## Properties / frontmatter
The official Obsidian CLI supports property/frontmatter commands. The n8n node exposes them as the **Property** resource:
- **Set** sends `property:set path=<note> name=<property> value=<value> type=<type>`
- **Read** sends `property:read path=<note> name=<property>`
- **Remove** sends `property:remove path=<note> name=<property>`
- **List** sends `properties name=<optional> format=<yaml|json|tsv>`
Examples:
```text
path=00 Kontext/Feedback Browser CLI Tests.md
name=tags
value=kontext, feedback-browser-cli-tests
type=list
```
```text
path=00 Kontext/Feedback Browser CLI Tests.md
name=date
value=2026-06-24
type=date
```
## Local install in self-hosted n8n
From this repo:
```bash
cd packages/n8n-nodes-obsidian-api
npm install --ignore-scripts
npm run build
npm pack
```
Then install the generated `.tgz` in your n8n custom extensions setup.
For Docker-based n8n, one common setup is mounting this package into n8n's custom extensions directory and setting:
```env
N8N_CUSTOM_EXTENSIONS=/home/node/.n8n/custom
```
Exact installation depends on your n8n deployment.
## Development
```bash
npm install --ignore-scripts
npm run typecheck
npm run build
```
`--ignore-scripts` avoids local native builds from n8n transitive dependencies on unsupported bleeding-edge Node versions. Use the Node version recommended by your n8n release for production builds.