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 document and notebook management tasks. The "Remove Document" operation specifically allows users to permanently delete a document by providing its unique document ID.
Common scenarios for this operation include:
- Automating cleanup of outdated or irrelevant documents in bulk.
- Integrating with workflows that archive or remove documents based on external triggers.
- Managing document lifecycle programmatically without manual intervention in the SiYuan UI.
Example use case: Automatically deleting project notes after project completion to keep the workspace tidy.
Properties
| Name | Meaning |
|---|---|
| Document ID | The unique identifier of the SiYuan document you want to delete. This is required to specify which document to remove. |
Output
The output JSON contains the response from the SiYuan API after attempting to remove the document. Typically, it will indicate success or provide details if the deletion failed. The exact structure depends on the API but generally includes confirmation of removal or an error message.
No binary data is output by this operation.
Dependencies
- Requires an active connection to the SiYuan API via an API URL and an API token credential.
- The node expects these credentials to be configured in n8n prior to execution.
- The SiYuanClient library (bundled) is used internally to communicate with the SiYuan API.
Troubleshooting
- Missing Credentials: If the API URL or token is not set, the node will throw a "Credentials missing!" error. Ensure the API key credential is properly configured.
- Invalid Document ID: Providing a non-existent or incorrect document ID will likely cause an error from the API indicating the document could not be found or deleted.
- Permission Issues: The API token must have sufficient permissions to delete documents; otherwise, the operation will fail.
- Network Issues: Connectivity problems to the SiYuan server will result in request failures.
- To resolve errors, verify credentials, confirm the document ID exists, and check network connectivity.
Links and References
- SiYuan Official Website
- SiYuan API Documentation
- Markdown Guide (for content formatting in other operations)