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, allowing users to perform a variety of operations on notebooks, documents, and content blocks. Specifically, the "Delete Block" operation permanently removes a specific block (such as a paragraph, list item, image, or even an entire document block) identified by its unique ID.
Use cases for this node include:
- Automating cleanup of outdated or irrelevant content blocks within your SiYuan workspace.
- Managing content programmatically by deleting blocks that meet certain criteria.
- Integrating SiYuan content management into larger workflows where content lifecycle is controlled externally.
For example, you might use this node to delete a paragraph block after processing its content elsewhere, or to remove obsolete image blocks from a document automatically.
Properties
| Name | Meaning |
|---|---|
| Block ID | The unique identifier of the specific block you want to delete. This can be any block type such as a paragraph, list, image, or document block. |
Output
The output JSON contains the result of the delete operation. Typically, it returns an object indicating success or relevant response data from the SiYuan API. If the deletion is successful, the output will confirm the action; if not, it may contain error information.
No binary data is output by this operation.
Example output JSON structure:
{
"success": true
}
or in case of failure:
{
"error": "Error message describing what went wrong"
}
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 the API key credential is correctly set up in n8n.
- Invalid Block ID: Providing a non-existent or malformed block ID will cause the API to return an error. Verify the block ID before running the node.
- Permission Issues: If the API token lacks sufficient permissions to delete blocks, the operation will fail. Check the API token's scope and permissions.
- Network Issues: Connectivity problems between n8n and the SiYuan server will cause request failures. Confirm network accessibility and correct API endpoint configuration.
Links and References
- SiYuan Official Website
- SiYuan API Documentation
- Markdown Guide (for understanding block content formats)