Learn how to create and amend templates and introduce more complex configuration to use for automatic document generation.
How to prepare templates for Document Generation
Follow these instructions to prepare a template for automatic document generation:
- Create a new template in MS Word or open an existing template document.
- Add text and formatting to your template document.
- Populate the template document's text with placeholders at the points where you want dynamic content to display.
Placeholders are text in curly braces, like {{placeholder_name}}. There are few limitations on the structure of a placeholder name, but we recommend using underscores between words to reduce errors and to keep the placeholder name short. When using the same placeholder multiple times, make sure their names always match. - As best practice, ensure that the placeholder names in the template document match the variable names in the originating module. This will allow to automatically match them in the Create Document Action.
- Save the template in .docx format. Your template is now ready to upload into a Create Document Action.
Advanced template configurations
- Avoid empty lines or paragraphs
- Insert a collection into a table in your document template
- When positioning placeholders manually in a table, avoid empty rows and columns
- Manage documents with many optional pieces of text using conditional placeholders
Your next step:
Once you have prepared your template, you can upload it in a Create Document Action Node and start automating your document.
Occasionally asked questions
How do I best name placeholders referring to variables from Multi-Input Nodes?
We recommend using the node name and the input name, separated by an arrow "==>", for example: "Address ==> City". This also enables automated matching in the Create Document Action.