Document Templates
Create documents from reusable templates with data auto-filled from Muin. Standardize reports and letters, cut manual work, and keep every output consistent.
Document templates let you create standardized documents with data automatically filled in from Muin. Generate reports, letters, and other documents without starting from scratch.
What Are Templates?
Templates are document blueprints with:
- Fixed content - Standard text, formatting, branding
- Variable fields - Placeholders filled with real data
- Conditional sections - Content that appears based on conditions
- Repeating sections - For lists and tables
Using Pre-Built Templates
Available Templates
Muin includes templates for common documents:
| Category | Templates |
|---|---|
| Finance | Invoice, Payment receipt, Statement |
| HR | Offer letter, Employment verification |
| Vendors | Purchase order, RFP, Vendor letter |
| General | Cover letter, Memo, Report |
Using a Template
- Navigate to Documents → Templates
- Browse or search for a template
- Click Use Template
- Select data source (document, record)
- Review generated document
- Save or download
Template Preview
Before generating:
- Click Preview on any template
- See example output with sample data
- Understand what data is needed
Creating Custom Templates
Starting a New Template
- Navigate to Documents → Templates
- Click Create Template
- Choose starting point:
- Blank template
- Upload existing document
- Copy existing template
Adding Fixed Content
Type or paste standard content:
- Company letterhead
- Boilerplate paragraphs
- Instructions
- Legal disclaimers
Adding Variable Fields
Insert placeholders that fill with data:
- Click Insert Field
- Choose data source:
- Document field (from extracted data)
- Record field (from linked record)
- System field (date, user, etc.)
- Position in document
- Configure formatting
Example fields:
{{vendor.name}}- Vendor company name{{invoice.total}}- Invoice amount{{document.date}}- Document date{{current_date}}- Today’s date{{user.name}}- Current user
Template Variables
| Variable Type | Example | Source |
|---|---|---|
| Document | {{invoice.vendor}} | Extracted data |
| Record | {{employee.title}} | Linked record |
| System | {{current_date}} | System generated |
| User | {{user.email}} | Current user |
| Organization | {{org.name}} | Organization settings |
Conditional Sections
Adding Conditions
Show content only when conditions are met:
- Select the content block
- Click Make Conditional
- Set condition:
{{amount}} > 10000- Show for large amounts{{status}} == "overdue"- Show for overdue
- Content appears only when true
Example: Payment Terms
{{#if payment_terms == "Net 30"}}
Payment is due within 30 days of invoice date.
{{/if}}
{{#if payment_terms == "Due on Receipt"}}
Payment is due immediately upon receipt.
{{/if}}
Repeating Sections
For Lists and Tables
Create sections that repeat for each item:
- Select content to repeat
- Click Make Repeating
- Choose the data collection (e.g., line items)
- Content repeats for each item
Example: Invoice Line Items
{{#each line_items}}
| {{description}} | {{quantity}} | {{unit_price}} | {{total}} |
{{/each}}
Produces a row for each line item.
Generating Documents
From a Document
- Open a document
- Click Generate from Template
- Select template
- Preview the result
- Save or download
From a Record
- Open a record (vendor, employee, etc.)
- Click Generate Document
- Select template
- Choose which documents to include
- Preview and save
Batch Generation
Generate multiple documents at once:
- Select multiple records or documents
- Click Batch Generate
- Select template
- Documents generated for each
- Download as ZIP or save individually
Template Management
Organizing Templates
Create folders for templates:
- By department (Finance, HR, Vendors)
- By document type (Letters, Reports, Forms)
- By use case (Internal, External)
Template Versioning
Track template changes:
- Open template
- Click Version History
- See all versions with changes
- Restore previous if needed
Sharing Templates
Control who can use templates:
- Personal - Only you
- Team - Your team
- Organization - Everyone
- Published - Available in template gallery
Best Practices
Template Design
- Test with real data - Ensure fields work correctly
- Handle edge cases - What if a field is empty?
- Consistent branding - Match company standards
- Clear naming - Describe purpose and use case
Variable Fields
- Use descriptive names - Clear field references
- Provide defaults - For optional fields
- Format appropriately - Dates, currency, etc.
- Document requirements - Note what data is needed
Maintenance
- Review regularly - Keep content current
- Update for changes - When policies or branding change
- Archive old versions - Don’t delete, just deactivate
Troubleshooting
Fields Not Filling
- Verify field name matches data source
- Check data exists in source document/record
- Review field syntax
- Test with different source
Formatting Issues
- Check template formatting
- Verify field doesn’t break layout
- Use appropriate field types
- Test with various data lengths
Conditional Not Working
- Verify condition syntax
- Check field values match expected
- Test with known values
- Simplify condition to debug
Next Steps
- Document Processing - Understanding document data
- Building Workflows - Auto-generate documents
- AI Agents - Automated document generation