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 "List Documents in Notebook" operation retrieves all documents directly contained within a specified notebook, including their titles and unique IDs.

This functionality is useful for workflows that need to:

  • Enumerate documents inside a particular notebook for further processing.
  • Synchronize or back up document lists.
  • Generate reports or indexes of notebook contents.

For example, you could use this node to fetch all documents in a project notebook and then process each document's content or metadata in subsequent workflow steps.

Properties

Name Meaning
Notebook ID The unique identifier of the SiYuan notebook whose documents you want to list.

Output

The output JSON array contains objects representing each document found directly within the specified notebook. Each object typically includes at least the document's title and its unique ID.

Example output structure (simplified):

[
  {
    "id": "document-unique-id-1",
    "title": "Document Title 1"
  },
  {
    "id": "document-unique-id-2",
    "title": "Document Title 2"
  }
]

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the SiYuan API, authenticated via an API URL and an API token credential.
  • The node expects these credentials to be configured in n8n prior to execution.
  • No additional external dependencies are needed beyond the SiYuan API access.

Troubleshooting

  • Missing Credentials: If the API URL or token is not set, the node will throw a "Credentials missing!" error. Ensure that valid SiYuan API credentials are configured.
  • Invalid Notebook ID: Providing an incorrect or non-existent notebook ID may result in empty results or API errors. Verify the notebook ID before running the node.
  • API Connectivity Issues: Network problems or incorrect API URLs can cause failures. Confirm network access and correct API endpoint configuration.
  • Unsupported Operation Error: This node supports many operations; ensure "listDocsInNotebook" is selected when intending to list documents.

Links and References

Discussion