Create documents from templates
Turn reusable Word layouts into finished documents. Upload a DOCX or DOTX template, add placeholders for changing values, and ask a yeos agent to generate a formatted DOCX.
Upload a document template
Templates are managed separately from ordinary knowledge documents and can be reused by agents in their authorized organization or workspace scope.
Choose “Upload as template”
In Documents, choose Upload, then Upload as template. This registers the file as a reusable layout rather than an ordinary searchable document.
Add template details
Select a valid, macro-free DOCX or DOTX file, give it a display name, and optionally add a description. Agents use the name to identify the template.
Set scope and knowledge search
Choose the organization or selected workspace. Keep Also use in knowledge base disabled for formatting-only templates; enable it only when the template should also be searchable as knowledge.
Templates and knowledge search
A document template is excluded from ordinary knowledge indexing by default, so its layout and placeholder instructions do not appear as evidence. If your workflow needs the template content to be searchable as knowledge too, explicitly enable the knowledge-base option during upload.
Add placeholders to the Word layout
Use simple Jinja-style names wherever generated content should appear. Keep names clear and consistent so the agent can supply the right values.
{{ project_name }}
{{ report_date }}Tell the agent to provide every required placeholder value. Missing values or invalid syntax prevent a ready artifact from being created.
Repeat rows in a document-template table
For a repeated table section, put the loop-start tag in its own Word table row, keep the placeholder row between the loop tags, and put the loop-end tag in its own row.
{%tr for item in items %}
{{ item.name }} | {{ item.amount }}
{%tr endfor %}Put each loop tag in its own Word table row, with the placeholder row between them. The middle row is repeated for every item.
Generate a document with an agent
Ask for a document using the template display name and include the values or list of items needed to fill it. If several active templates have similar names, identify the intended template unambiguously.
Name the template
Refer to the active document template by its display name in your request.
Provide the content
Include the facts, field values, and any repeated items the document should contain.
Download the DOCX
The agent returns a normal DOCX artifact with supported template formatting preserved. The template ID and version are retained as provenance.
Example request
Create a DOCX project status report using the “Project Status” template. Set the project name to Apollo, use today’s date, and include each task with its status.
Check the generated document
Download the file and verify the output before sharing it:
- Scalar placeholders have been replaced with the requested values.
- Repeated tables contain one row for each item, with no loop tags left.
- The generated DOCX preserves the supported template formatting.
- A DOTX template also generates a DOCX, and the source template version is recorded.
Access boundaries
Users and agents only see documents and active document templates authorized for the current organization and workspace context.
Only organization owners and admins can manage document templates. Users and agents can use only active templates authorized for their current organization and workspace context. Generation does not silently fall back to an unformatted document when a requested template fails.
Need the full document-library guide?
Read about uploading ordinary files and folders, adding websites, processing status, and template management.