SiYuan icon

SiYuan

Manage SiYuan notebooks, documents, blocks, attributes, and more. Designed for AI agent workflows.

Document → Get ID by Path

AI-generated

Overview

This node operation retrieves the unique ID of a document within a SiYuan notebook based on its folder-like path. It is useful when you need to programmatically access or reference a document by its path rather than its ID, such as in automation workflows that organize or manipulate documents in a notebook structure.

Use Case Examples

  1. Get the ID of a meeting notes document located at `/My Project/Meeting Notes` within a specified notebook.
  2. Automate document retrieval by path to link or update documents without manually looking up their IDs.

Properties

Name Meaning
Notebook ID The unique ID of the notebook where the document resides.
Document Path The folder-like path for the document, starting with `/`, indicating the location of the document within the notebook.

Output

JSON

  • id - The unique identifier of the document found at the specified path.
  • success - Indicates whether the operation was successful.

Dependencies

  • SiYuan API URL and Token credentials are required to authenticate and interact with the SiYuan API.

Troubleshooting

  • Ensure the Notebook ID and Document Path are correctly specified and the path starts with `/`.
  • Verify that the SiYuan API URL and Token credentials are correctly set and valid.
  • If the document path does not exist, the node may return an error or a failure response.
  • Check for network connectivity issues that might prevent communication with the SiYuan API.

Discussion