What can you do with it?
The/office-template-fill command enables you to fill Microsoft Office templates (Word .docx, PowerPoint .pptx, Excel .xlsx) with dynamic data while preserving all formatting. You can generate contracts, reports, invoices, presentations, and spreadsheets by replacing placeholders in templates with actual data.
This skill preserves all formatting from your original template including fonts, colors, styles, headers, footers, and images. Only the placeholder variables are replaced with your data.
How to use it?
Basic Command Structure
Parameters
Required:template_source- How to load the template file (one of three methods):uploaded_file- Template uploaded to the automationartifact- Template from a previous step’s outputurl- Template from a URL
data- JavaScript object containing the data to fill into the template
filename- Custom name for the output file (defaults to template name with prefix)file_type- Output format:docx,pptx, orxlsx(auto-detected from template)
Template Syntax
Templates use a simple placeholder syntax with curly braces:| Syntax | Description | Example |
|---|---|---|
{variable} | Simple variable replacement | {firstName} |
{object.property} | Nested object access | {user.email} |
{#condition}...{/condition} | Conditional sections | {#isPremium}Premium content{/isPremium} |
{^condition}...{/condition} | Inverted conditionals | {^isPremium}Upgrade now{/isPremium} |
{#array}...{/array} | Loops/iterations | {#items}{name}{/items} |
Response Format
The command returns:Examples
Basic Usage - Contract from Uploaded Template
Advanced Usage - Invoice with Line Items
Complex Usage - Department Report with Nested Data
Test Template
Download our comprehensive test template to see all features in action: 📄 Download Test Template This template demonstrates:- Simple variable replacement
- Conditional sections (premium/standard)
- Product tables with loops
- Nested department structures
- Multi-level organizational hierarchies
- Financial calculations
- Signature blocks
Notes
- Templates must be .docx, .pptx, or .xlsx format (not older .doc/.ppt/.xls)
- All formatting from the original template is preserved
- Missing data fields are replaced with empty strings
- Cannot dynamically insert images (place them in the template)
- Cannot render HTML content (use plain text only)

