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
The node interacts with the SiYuan note-taking and knowledge management system via its API. Specifically, the "Prepend Block" operation adds a new block of content (in Markdown or HTML format) to the beginning of a specified parent block, which can be a document or another block container. This is useful when you want to insert new content at the very start of an existing block structure, such as adding an introduction paragraph before existing content in a document or list.
Practical examples:
- Prepending a summary or header block to an existing document.
- Adding a new item at the top of a list or collection of blocks.
- Inserting metadata or notes at the beginning of a section.
Properties
| Name | Meaning |
|---|---|
| Parent Block ID | The unique identifier of the block (e.g., a document or list) inside which the new content will be added at the beginning. |
| Content (Markdown/HTML) | The text content and formatting for the new block, provided in Markdown or HTML. This defines what the prepended block will contain. |
Output
The output JSON contains the response from the SiYuan API after attempting to prepend the block. Typically, this includes details about the newly created block such as its unique ID and any metadata returned by the API. If the operation succeeds, the output confirms success and provides relevant block information. If it fails, an error message is included.
The node does not output binary data.
Dependencies
- Requires an active connection to the SiYuan API.
- Needs credentials including the API URL and an API authentication token.
- The user must configure these credentials within n8n prior to using the node.
Troubleshooting
- Missing Credentials: The node will throw an error if the API URL or token is missing. Ensure that valid credentials are set up in n8n.
- Invalid Parent Block ID: If the specified parent block ID does not exist or is incorrect, the API call will fail. Verify the ID before running the node.
- Content Formatting Issues: Improperly formatted Markdown or HTML may cause unexpected rendering or errors. Validate the content syntax.
- API Errors: Network issues or API rate limits may cause failures. Check connectivity and API usage limits.
- Unsupported Operation Error: If the operation parameter is incorrectly set, the node will throw an unsupported operation error.