SiYuan icon

SiYuan

Interacts with the SiYuan API using selected operations

Overview

The node integrates with the SiYuan API to perform various document and notebook management operations within the SiYuan note-taking and knowledge management system. Specifically, the "Move Document" operation allows users to move a document from its current location to another notebook or parent document. This is useful for reorganizing content, such as moving notes between projects or restructuring documentation hierarchies.

Practical examples:

  • Moving a meeting notes document into a different project notebook.
  • Reorganizing sub-documents by moving them under a new parent document.
  • Automating document relocation based on workflow triggers.

Properties

Name Meaning
Document ID The unique identifier of the SiYuan document you want to move.
New Parent ID (Notebook/Doc) The unique identifier of the destination notebook or parent document where the document will be moved.

Output

The output is a JSON object representing the result of the move operation. Typically, it contains success confirmation or details about the moved document(s). If the operation fails, an error message is returned in the JSON output.

No binary data is produced by this operation.

Dependencies

  • Requires an active connection to the SiYuan API via an API URL and an API authentication token.
  • The node expects valid credentials configured in n8n that provide access to the SiYuan API.
  • The SiYuanClient library is used internally to communicate with the SiYuan API endpoints.

Troubleshooting

  • Missing Credentials: If the API URL or token is not provided, the node throws a "Credentials missing!" error. Ensure that the API key credential is properly set up in n8n.
  • Invalid Document or Parent IDs: Providing incorrect or non-existent document IDs or target parent IDs will cause the operation to fail. Verify IDs are correct and exist in your SiYuan workspace.
  • Permission Issues: Insufficient permissions on the SiYuan side may prevent moving documents. Confirm that the API token has appropriate rights.
  • Unsupported Operation Error: If the operation parameter is incorrectly set or unsupported, the node will throw an error indicating the unsupported operation.

Links and References

Discussion