This page uses Google Docs for its examples. The placeholder rules below apply to Word (.docx) templates as well, since both use the same
{{placeholder}} syntax. PDF templates work differently: fields are positioned visually rather than typed into the page.Placeholder Not Being Replaced
Problem
A placeholder in your template (e.g.,{{customer_name}}) appears in the generated document instead of being replaced with actual data.
Causes & Solutions
- Name mismatch
- Smart quotes
- Field not mapped
The placeholder name in your template must exactly match the field name from your data source. Placeholder names are case-sensitive.
Mismatched Placeholder Brackets
Problem
You see errors or unreplaced placeholders because the opening{{ and closing }} brackets don’t match.
Common Mistakes
Solution
Always use exactly two opening braces{{ and two closing braces }}. Use the Template Check feature in DocsAutomator to validate your template before generating documents.
Line Item Syntax Issues
Problem
Line item rows are not being generated, or the table shows raw placeholder text.Common Mistakes
- Missing table row: Line item placeholders must be placed inside a table row. They cannot be used in regular paragraph text. This applies to Word templates too: a line item marker outside a table row is dropped.
-
Wrong prefix: Line item placeholders use the format
{{line_items_N_fieldName}}where N is the line item group number (1, 2, 3, etc.). - Inconsistent group numbers: All placeholders in the same table row must use the same group number.
Solution
- Place all line item placeholders in a single table row
- Use the correct
line_items_N_prefix format - Ensure the field names after the prefix match your data source fields exactly
Special Characters in Placeholder Names
Problem
Placeholders with special characters in their names fail to be replaced.Rules for Placeholder Names
- Use only letters, numbers, and underscores
- Do not use spaces, hyphens, periods, or other special characters in placeholder names
- Start with a letter or underscore, not a number
Conditional Section Not Working
Problem
A conditional section ({{#if condition}}...{{/if}}) is not showing or hiding as expected.
Common Causes
- Truthy/falsy values: Empty strings,
null,undefined, andfalseevaluate as falsy (section hidden). Non-empty strings, numbers, andtrueevaluate as truthy (section shown). - Whitespace: A field that appears empty might contain whitespace. Trim values in your data source.
- Wrong placeholder name: The condition field name must match a field in your data, just like regular placeholders.
Image Placeholder Issues
Problem
Dynamic image placeholders are not rendering the image, or the image appears broken.Common Causes
- Invalid URL: The image URL must be publicly accessible. Private or authenticated URLs will not work.
- URL expired: Some data sources (like Airtable) generate temporary attachment URLs that expire. Ensure the URL is still valid.
- Image too large: Very large images may cause timeouts. Optimize images before using them in templates.
Related
Template Guide
Complete guide to creating templates
Line Items
Line items setup and configuration