Built-in apps

Microsoft Word Templates

6min
with the microsoft word templates app in {{product name}} , you can merge data from various services with templates and create microsoft word documents you do not need to establish a connection to use the microsoft word templates app microsoft word templates modules actions fill out a document in this module, the content of the field value has to be an array of collections, where each collection corresponds to one data entry and contains one item entry item entry contains a collection with two items key and value item key contains the tag's name item value contains the tag's value template text > {{#contact}} \> {{name}}, {{phone}} \> {{/contact}} the created document > jan toman, 1234 \> eduard salo, 7899999 you can also run a loop to populate a table the example below shows how to create such table in a template populate a table aggregators fill a document with a batch of data if your data entries come as separate bundles, you may prefer to employ the fill a document with a batch of data aggregator module you can also employ this module if your data entries come as an array just employ the iterator module to transform the content of the array into a series of bundles the main advantage of the fill a document with a batch of data module is that it enables you to easily setup the structure required for the value field and map items to each value item in contrast to the fill out a document module, the field values contains only a single entry, the actual entries will be created and populated for each incoming bundle the template will be produced after all input bundles have been processed the aggregator module is useful, especially when creating lists or reports example export google contacts into a table the first module loads the template the next module retrieves all contacts from the specified group in google contacts the aggregator module then aggregates all values retrieved from google contacts and merges them into the template finally, the last module will save the filled template to a desired location template final document template creation in microsoft word a template is a regular microsoft word document ( docx file) with special tags in its text that determine where and how to merge/fill in data there are three types of tags simple value , condition, and loop or section simple value a simple value tag is simply replaced with a corresponding value the tag's name corresponds to the key field's value, which is placed inside double curly braces e g {{name}} the microsoft word templates app accepts only single line plain text for replacement values when adding line breaks, they will be viewed as spaces and won't affect the formatting of the text template > hi {{name}}! module's setup created document > hi petr! condition a condition tag enables you to wrap certain parts of a text that should be rendered conditionally to wrap the conditional text, place it between the opening and closing tags the name of the opening tag is prepended with a hash sign # , the name of the closing tag is prepended with a slash / template > {{#hasphone}}phone {{phone}} {{/hasphone}} \> {{#hasemail}}email {{email}} {{/hasemail}} module setup created document > phone 123456 loop or section a loop or section tag enables you to repeat parts of a text similarly to the condition tag, to wrap the repeated text, place it between the opening and closing tags the name of the opening tag is prepended with a hash sign # , the name of the closing tag is prepended with a slash / when using loops, you can choose to employ either the fill out a document module or the fill a document with a batch of data aggregator module