This article will help you:
- understand how to use Create Document Action to incorporate your own Microsoft Word
template to offer customized downloadable files to your users
- evade common mistakes, e.g., avoiding empty paragraphs by introducing the {{\dl}} command
At the end of a module, you will likely offer some sort of feedback to your user, usually by displaying a message in a Result Node. Whilst it gets the job done, generating a Document and offering the user a downloadable file that reflects your corporate identity may be a more elegant solution. Using the Create Document Action you can benefit from incorporating your own template in business communications within and outside of your organization.
![]() |
![]() |
Result as displayed in the BRYTER editor (above) and the Wizard preview or published menu (below). | Document with a custom template |
The starting point for this tutorial is a basic KYC Checker module, similar to the one you can find in the Quickstart tutorial.
Generate documents
Follow the steps below to generate documents using Create Document Action:
- Click the plus icon โ + โ on a Node.
- Select New Action.
- In the attribute editor which opens, select Create Document.
- Double-click New Document to name your Action. This will serve as the file name of the document your users receive unless you choose to provide an optional file name via the DOCUMENT FILE NAME field.
- Select a File extension for your document (DOCX or PDF).
Now that you have added a Create Document Action to your module, it is time to create a custom template.
Open a Microsoft Word document to create a custom template. Add text and formatting to your template. Create placeholders by using two sets of curly brackets '{{ }}' in combination with text. For instance, if you wanted to create a placeholder for a value 'Country', it could look something like this: {{country}}.
Now, if you save your template as a DOCX file and upload it via the Template drop-down menu in the attribute editor to your Create Document Action, the template is scanned and all placeholders are identified.
The next step is to assign corresponding values to your placeholders. Below each placeholder will be a drop-down menu. Use the menu to reference the node carrying the relevant information, likely a Text Block Value or an Input Node. In our example, we would choose the node holding the user input for the value 'country'.
๐ก When you upload a new template, BRYTER will usually recognize placeholders that match the values found in your module and offer you to map values to the respective placeholders.
Upload your template
Once you have created your template, save it as a DOCX file and upload it via the Template dropdown menu in the attribute editor. Your stylings will be reflected in the output document unless there is custom styling inputted in the BRYTER editor that overrides your template style.
- Select a Template from the drop-down menu or upload your own.
- The template will be scanned for placeholders and a new section PLACEHOLDER will appear.
- Assign the appropriate value to each placeholder by referencing the corresponding Input, Value, or Action in the drop-down menu.
Avoid empty paragraphs using {{\dl}}
Note that sometimes a text field could end up empty because e.g., an input was optional, a user did not reach a certain Text Block Value, or did not want a specific clause to be included. If you reference this Node using the technique described above, you will get an empty paragraph in your document. To avoid this, add {{\dl}}, which stands for 'delete line', at the end of your placeholder. Your placeholder will look like this: {{title_business_relationship}}{{\dl}} and {{input_business_relationship}}{{\dl}}.
In this example, the user is given the option to provide a description as to the purpose and intended nature of the business relationship. When the user inputs a description, therefore the Input Node 'Business relationship' is not (โ ) blank, the title {{title_business_relationship}} followed by the user-input description {{input_business_relationship}} appears in the generated document.
Create Document Action view: The placeholders {{title_business_relationship}} and {{input_business_relationship}} are assigned to the Text Block Values 'Title Business Relationship' and 'Input Business Relationship'.
![]() |
![]() |
Result as displayed to users when they did not provide an optional description of the purpose and intended nature of the business relationship. | Result as displayed with an optional description of the business relationship. |
Note on Legacy behavior
If you have created modules that contain Create Document Action prior to June 2020, no further action is required. While we may have moved on to more advanced document generation functionality, the functionality of the old workflow remains. However, we may no longer offer technical support for the old Document Generation Action Node. We recommend you follow the steps below to update your Create Document Action.
Keywords: {}; {{}}; brakets; {{; }};