Instantiate Template Natively
instantiate_template_nativeCreates a new document from a template using native block cloning, with optional variable substitution and fallback to markdown if needed.
Instructions
Instantiate a template using native AFFiNE block cloning when supported, falling back to markdown materialization only when necessary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspaceId | No | ||
| templateDocId | Yes | The template doc to instantiate. | |
| title | No | Optional title for the new document. Defaults to the template title. | |
| variables | No | Key-value map of {{variable}} substitutions applied during cloning. | |
| parentDocId | No | Optional parent doc to link the instantiated doc under in the sidebar. | |
| allowFallback | No | If false, fail instead of falling back to markdown materialization when native cloning is unsupported. | |
| preserveTags | No | If true (default), copy the template's tags onto the instantiated doc. |