Instantiate Template Natively
instantiate_template_nativeCreate a new document from a template using native block cloning, supporting variable substitution and tag preservation, with fallback to markdown materialization when native cloning is unsupported.
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 |
|---|---|---|---|
| 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. | |
| workspaceId | No | AFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured. | |
| preserveTags | No | If true (default), copy the template's tags onto the instantiated doc. | |
| allowFallback | No | If false, fail instead of falling back to markdown materialization when native cloning is unsupported. | |
| templateDocId | Yes | The template doc to instantiate. |