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 content and document management tasks within SiYuan. Specifically, the "Push Error Message" operation allows users to display an error notification popup (toast message) in the SiYuan user interface. This is useful for alerting users about issues or important error conditions directly inside their SiYuan workspace.
Common scenarios include:
- Alerting users when a workflow encounters an error related to SiYuan content.
- Providing immediate feedback on failed operations or invalid inputs.
- Enhancing user experience by showing contextual error messages during automated processes.
Example: If a document creation fails due to invalid parameters, this node can push an error toast notification with a custom message like "Failed to create document: Invalid path."
Properties
| Name | Meaning |
|---|---|
| Message | The text content of the error notification message to show in SiYuan. |
| Timeout (Ms) | Duration in milliseconds that the error message should remain visible (e.g., 7000 = 7 seconds). |
Output
The output JSON contains the response from the SiYuan API after attempting to push the error message. Typically, it will confirm success or provide details if the operation failed. The structure depends on the API but generally includes a success indicator or error information.
No binary data is output by this operation.
Dependencies
- Requires valid credentials for the SiYuan API, including:
- The base URL of the SiYuan instance.
- An API authentication token.
- These credentials must be configured in n8n prior to using the node.
- The node uses an internal SiYuan client library to communicate with the API.
Troubleshooting
- Missing Credentials: If the API URL or token is not set, the node throws a "Credentials missing!" error. Ensure credentials are properly configured.
- Unsupported Operation: Using an operation other than those supported by the node will cause an error indicating the operation is unsupported.
- API Errors: If the SiYuan API rejects the request (e.g., invalid message format), the node will throw an error with the API's message. Verify the message content and timeout values.
- Timeout Too Short: Setting the timeout too low may cause the message to disappear before users notice it. Use a reasonable duration (e.g., 3000 ms or more).
- Continue On Fail: If enabled, the node will continue processing subsequent items even if pushing the error message fails, returning the error message in the output JSON.