Actions71
- Asset Actions
- Attribute Actions
- Block Actions
- Database Actions
- Document Actions
- Markdown Table Actions
- Notebook Actions
- Search Actions
- System Actions
- Tag Actions
Attribute → Set
AI-generatedOverview
This node operation sets custom and built-in attributes on a specified block within the SiYuan workspace. It is useful for updating metadata or properties of content blocks, such as setting titles, aliases, icons, or custom attributes prefixed with `custom-`. For example, you can use this operation to update the title of a block or add a custom status attribute to it.
Use Case Examples
- Set the title attribute of a block to 'Project Overview'.
- Add a custom attribute 'custom-status' with value 'In Progress' to a block.
Properties
| Name | Meaning |
|---|---|
| Block ID | The unique ID of the block on which attributes will be set. |
| Attributes | Name/value pairs of attributes to set on the block. Custom attribute names must start with `custom-`. Built-in attribute names include title, name, alias, memo, bookmark, and icon. |
Output
JSON
success- Indicates whether the attribute set operation was successful.
Dependencies
- Requires SiYuan API URL and API token credentials for authentication.
Troubleshooting
- Ensure the Block ID is valid and exists in the SiYuan workspace to avoid errors.
- Verify that attribute names follow the naming conventions, especially custom attributes starting with `custom-`.
- Check that the API URL and token credentials are correctly configured and have sufficient permissions.
- Common error: 'SiYuan API URL and Token are required.' means credentials are missing or invalid; provide valid credentials to resolve.