n8n-nodes-trilium
v1.0.1
Published
n8n node for Trilium Notes via ETAPI - Enhanced with batch operations, advanced search, export/import, calendar, and templates
Maintainers
Readme
n8n-nodes-trilium
This is an n8n community node that lets you use Trilium Notes in your n8n workflows via the ETAPI (External API).
Includes batch operations, advanced search, export/import, calendar notes, and template management.
n8n is a fair-code licensed workflow automation platform.
Trilium Notes is a hierarchical note-taking application focused on building large personal knowledge bases.
Installation
Follow the installation guide in the n8n community nodes documentation.
Community Nodes (n8n 0.234.0+)
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-triliumin Enter npm package name - Agree to the risks and click Install
Manual installation
To get started install the package in your n8n root directory:
npm install n8n-nodes-triliumFor Docker-based deployments add the package in your package.json file or environment variables.
Configuration
Getting your ETAPI Token
- Open Trilium Notes
- Go to Menu → Options → ETAPI
- Click Create new ETAPI token
- Copy the token and save it securely
- Use this token when configuring the Trilium credentials in n8n
Credentials
This node requires Trilium API credentials:
- Base URL: URL of your Trilium instance (default:
http://localhost:37740) - ETAPI Token: Your generated ETAPI token
Operations
Note
- Create: Create a new note
- Get: Retrieve note by ID
- Update: Update note content, title, or type
- Delete: Delete a note
- Search: Search notes using fulltext or attribute filters
- Advanced Search ⭐ NEW: Search with filters (type, dates, attributes, sorting)
Batch - Create Multiple: Create multiple notes in one operation
- Update Multiple: Update multiple notes at once
- Delete Multiple: Delete multiple notes
- Move Multiple: Move notes to a new parent
Export - To HTML: Export note as standalone HTML file
- To Markdown: Export note as Markdown
- To JSON: Export note structure and metadata as JSON
- Subtree: Export note with all descendants
Import - From Markdown: Import Markdown content as notes
- From HTML: Import HTML content
- From JSON: Import structured JSON data
- From Text: Import plain text as notes
Calendar - Get Day Note: Get or create day note for a specific date
- Get Week Note: Get or create week note
- Get Month Note: Get or create month note
- List Range: List calendar notes in a date range
Template - Create From Template: Instantiate a note from a template
- List Templates: Get all template notes
- Mark As Template: Mark a note as a template
- Apply Template: Apply template attributes to an existing note
Attribute
- Create: Add an attribute (label or relation) to a note
- Get: Retrieve attribute by ID
- Update: Update attribute name or value
- Delete: Remove an attribute
- List: Get all attributes for a note
Attachment
- Upload: Upload a file attachment to a note
- Get: Download an attachment
- Update: Replace an attachment file
- Delete: Remove an attachment
Branch
- Create: Create a branch (clone/link note to another location)
- Get: Get branch information
- Delete: Remove a branch
Example Workflows
Create a Note with Attributes
Trilium - Create Note
- Parent Note ID:
root - Title:
Meeting Notes - Type:
text - Content:
Discussion points from today's meeting
- Parent Note ID:
Trilium - Create Attribute
- Note ID:
{{ $json.note.noteId }} - Type:
label - Name:
meetingDate - Value:
{{ $now }}
- Note ID:
Advanced Search with Filters
- Trilium - Advanced Search
- Search Query:
project documentation - Filters:
- Note Type:
text - Created After:
2024-01-01 - Has Attribute:
priority - Sort By:
Date Modified - Limit:
20
- Note Type:
- Search Query:
Batch Create Notes
- Trilium - Batch → Create Multiple
- Add multiple notes:
- Note 1: Parent
root, TitleTask 1, ContentFirst task - Note 2: Parent
root, TitleTask 2, ContentSecond task - Note 3: Parent
root, TitleTask 3, ContentThird task
- Note 1: Parent
- Add multiple notes:
Export and Import Workflow
Trilium - Export → To Markdown
- Note ID:
your-note-id - Options: Include Attributes
- Note ID:
Process/Transform (optional - modify the markdown)
Trilium - Import → From Markdown
- Parent Note ID:
target-parent-id - Content:
{{ $json.content }}
- Parent Note ID:
Calendar Integration
Trilium - Calendar → Get Day Note
- Date:
{{ $now }}
- Date:
Trilium - Update
- Note ID:
{{ $json.noteId }} - Update Fields:
- Content:
Today's journal entry...
- Content:
- Note ID:
Template-Based Note Creation
Trilium - Template → List Templates
Trilium - Template → Create From Template
- Template Note ID:
{{ $json[0].noteId }} - Parent Note ID:
root - Title:
New Project from Template
- Template Note ID:
Search and Update Notes
Trilium - Search
- Search Query:
#todo #priority-high
- Search Query:
Trilium - Update
- Note ID:
{{ $json.noteId }} - Update Fields:
- Content:
Updated: {{ $json.content }}
- Content:
- Note ID:
Upload File Attachment
HTTP Request (or any node that outputs binary data)
Trilium - Upload Attachment
- Note ID:
your-note-id - Binary Property:
data
- Note ID:
Compatibility
Tested with:
- n8n v1.0.0+
- Trilium Notes v0.60.0+
Resources
Version history
1.0.0
- Initial release
- Note operations: Create, Read, Update, Delete, Search, Advanced Search
- Batch operations: Create/update/delete/move multiple notes
- Export: HTML, Markdown, JSON, and subtree export
- Import: From Markdown, HTML, JSON, and plain text
- Calendar: Day/week/month notes with automatic creation
- Templates: Create from templates, list, mark, and apply templates
- Attributes: Labels and relations management
- Attachments: Upload, download, update, delete
- Branches: Clone/link notes to multiple locations
- ETAPI token authentication
