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
The "Create Document" operation in this SiYuan node allows users to create a new document inside a specified notebook within the SiYuan note-taking system. The content of the new document is provided as Markdown text, supporting GitHub Flavored Markdown formatting. This operation is useful for automating the creation of structured notes, project documentation, meeting minutes, or any textual content that benefits from Markdown formatting.
Practical examples include:
- Automatically generating daily meeting notes in a project notebook.
- Creating templated documents with predefined Markdown content.
- Adding new research notes programmatically into a specific notebook.
Properties
| Name | Meaning |
|---|---|
| Notebook ID | The unique identifier of the SiYuan notebook where the new document will be created. |
| Document Path | The folder-like path (starting with /) specifying where within the notebook the document should reside. |
| Markdown Content | The full text and formatting of the new document, written using GitHub Flavored Markdown syntax. |
Output
The output JSON contains the response from the SiYuan API after creating the document. Typically, this includes details about the newly created document such as its unique ID, path, and metadata confirming successful creation.
If the operation succeeds, the output JSON will reflect the created document's information. If no data is returned by the API, a default success object { success: true } is emitted.
This node does not output binary data.
Dependencies
- Requires an active connection to the SiYuan API endpoint.
- Needs an API authentication token credential configured in n8n to authorize requests.
- The user must provide valid notebook IDs and paths corresponding to their SiYuan workspace structure.
Troubleshooting
- Missing Credentials: If the API URL or token is not set or invalid, the node will throw a "Credentials missing!" error. Ensure the API key credential is properly configured.
- Invalid Notebook ID or Document Path: Providing incorrect notebook IDs or paths may cause the API to reject the request or fail to create the document. Verify these values carefully.
- Markdown Content Issues: Extremely large or malformed Markdown content might cause unexpected errors. Validate Markdown syntax if issues arise.
- API Errors: Network issues or SiYuan server errors can cause failures. Check connectivity and SiYuan server status.
- Unsupported Operation Error: This node supports multiple operations; ensure "Create Document" is selected when using this functionality.
Links and References
- SiYuan Official Website
- GitHub Flavored Markdown Spec
- SiYuan API Documentation (if publicly available)