Actions25
- Append Block
- Create Document
- Create Notebook
- Delete Block
- Execute SQL Query
- Export Document Markdown
- Get Block Attributes
- Get Block Kramdown
- Get Child Blocks
- Get Document ID by Path
- Get Document Path by ID
- Insert Block
- List Documents in Notebook
- List Files in Directory
- Move Document
- Prepend Block
- Push Error Message
- Push Message
- Remove Document
- Remove Notebook
- Rename Document
- Rename Notebook
- Render Sprig Template
- Set Block Attributes
- Update Block
Overview
This node integrates with the SiYuan note-taking and knowledge management system via its API, enabling automation of various notebook and document management tasks. It supports operations such as creating, renaming, moving, and deleting notebooks and documents, manipulating content blocks within documents, running SQL queries on the SiYuan database, and displaying messages in the SiYuan UI.
The "Remove Notebook" operation specifically allows users to permanently delete an entire notebook along with all its contents. This irreversible action is useful for cleaning up obsolete or unwanted notebooks programmatically without manual intervention.
Practical examples:
- Automatically removing archived project notebooks after a certain period.
- Cleaning up test or temporary notebooks created during automated workflows.
- Integrating with other systems to manage notebook lifecycle based on external triggers.
Properties
| Name | Meaning |
|---|---|
| Notebook ID | The unique identifier of the SiYuan notebook you want to remove. This is required to specify which notebook to delete. |
Output
The output JSON contains the result of the removal operation. Typically, it will indicate success or provide details about the deletion. If the operation fails, the output will include an error message describing the issue.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the SiYuan API, authenticated via an API URL and an API token credential.
- The node depends on the
SiYuanClientlibrary to communicate with the SiYuan API. - Proper credentials must be configured in n8n to allow API access.
Troubleshooting
- Missing Credentials: If the API URL or token is not provided or invalid, the node will throw a "Credentials missing!" error. Ensure that valid API credentials are set up in n8n.
- Invalid Notebook ID: Providing a non-existent or incorrect notebook ID will cause the API call to fail. Verify the notebook ID before attempting removal.
- Irreversible Action Warning: Since removing a notebook deletes all its contents permanently, accidental deletions can occur. Use caution and consider adding confirmation steps in your workflow.
- API Errors: Network issues or API downtime may cause failures. Check connectivity and SiYuan server status if errors persist.