SiYuan icon

SiYuan

Interacts with the SiYuan API using selected operations

Overview

This node integrates with the SiYuan note-taking and knowledge management system via its API, enabling automation of various document and notebook operations. Specifically, the "Rename Document" operation allows users to change the title of an existing document by specifying its unique document ID and the new desired title.

Common scenarios for this operation include:

  • Automatically updating document titles based on external triggers or workflows.
  • Renaming documents in bulk as part of content organization or migration processes.
  • Integrating with other systems where document titles need to be synchronized or standardized.

For example, you might use this node to rename a meeting notes document after the meeting date is finalized or to update project documentation titles when project names change.

Properties

Name Meaning
Document ID The unique identifier of the SiYuan document you want to rename.
New Title The new name/title you want to assign to the specified document.

Output

The output is a JSON object representing the result of the rename operation. Typically, it will contain confirmation data from the SiYuan API indicating success or details about the renamed document. If the operation succeeds without returning specific data, the output will at least indicate success.

No binary data is produced by this operation.

Example output JSON (conceptual):

{
  "success": true,
  "docId": "document-id",
  "newTitle": "Updated Document Title"
}

Dependencies

  • Requires an active connection to the SiYuan API, authenticated via an API URL and an API token credential.
  • The node depends on the SiYuanClient library 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, the node will throw a "Credentials missing!" error. Ensure that valid credentials are set up in n8n.
  • Invalid Document ID: Providing a non-existent or incorrect document ID will likely cause the API to return an error. Verify the document ID before running the node.
  • Permission Issues: Insufficient permissions on the API token may prevent renaming documents. Confirm that the API token has appropriate rights.
  • Unsupported Operation Error: This error occurs if an invalid operation value is used. Make sure the operation parameter is set to "renameDoc" for this functionality.
  • API Connectivity Problems: Network issues or incorrect API URLs can cause failures. Check connectivity and endpoint correctness.

Links and References

Discussion