en

Published November 2023

Document generation can make life easier – automatically populating contracts or quotes, ensuring consistency every time a document is sent out to a potential customer or vendor.

Microsoft 365 offers several options for document generation from centralising your company templates (no more running scripts to push out updates) to populating existing templates. In this blog, we walk you through the options, what they are, when they’re the best option and some pros/cons of each.

Organisational asset library

What is it?

A library of templates accessible to all employees, shown in the ‘new’ section Office applications (Word/PowerPoint/Excel), under the company tab. In the example below, the Engage Squared tab is displaying all Word templates in the organisational asset library for Engage Squared.

When to use it?

When you just need everyone to use the company-branded template. Too often we hear of people needing to navigate, search, or ask someone “hey I just need to get our template for PowerPoint presentations, do you know where the latest version is?” when it should be much easier.

This is a great solution to ensure everyone has easy access to Office templates and can quickly find and use the current templates. The asset library becomes a central template repository, ensuring that any changes are pushed out to everyone just by uploading / editing a document.

Pros

  • Templates are easy to find, reducing the temptation for employees to store a company template in their personal drive which eventually becomes out-of-date without the anyone knowing
  • All templates appear in office applications, reducing the effort for the employee to find a template
  • Increases employee confidence that they are using the most current template
  • Creates a central templates repository, they are updated in one place, and all updates are pushed out automatically
  • All updates can be made directly in the library if needed, using Office applications
  • No additional cost to the business
  • Templates can be permission-trimmed to target specific employees

Cons

  • No additional information is pushed into the document (e.g. document title)
  • There is an ongoing activity to manage the permissions of the templates to ensure they are only edited by specific users
  • Requires a Global Admin to run a PowerShell script to be executed (no GUI interface to turn this on)

Word templates with document properties

What is it?

Setting document properties in the document information panel which populate through to content controls in the document. This is particularly helpful to set one value and populate multiple places in the document.

When to use it?

When you want to insert the same piece of information (such as a publish date) in multiple places in the same document. This method gives you the option to select once and populate in multiple places with one click!

Pros

  • No additional cost to the business
  • Does not require any other technologies (such as Power Automate or third party tools)

Cons

  • This is only available to Word documents
  • The document information panel can be tricky to find

Word documents with metadata

What is it?

Using the document properties content controls, data is inserted into the document via SharePoint metadata or the document properties panel in Word. The document properties can be updated either from the desktop application or by updating the properties in SharePoint.

When to use it?

When you want to use a standard Microsoft 365 licence and out-of-the-box features without any additional investment. This is also a great solution when there isn’t a form to be completed so the document can be updated directly.

An example when this was used was for recruitment in a company which preferred to work in the windows explorer view. There was an external form which applicants completed and attached documentation (such as resume or police check).

When the form was submitted a flow was triggered to create a document in a SharePoint document library and use the data provided on the form to set document properties. When a member of the HR team accessed the document in explorer, the details from the application form (applicant’s name, address and role they are applying for) was set out neatly in a document for their review.

Should the HR team member navigate to the library, they would have also been able to filter the applications by job role as this was a property of the library.

Pros

  • No additional cost to the business
  • Templates can be easily updated in place as needed
  • Data inserted into documents can also be used to filter, sort or group the documents
  • The inserted data can easily be updated in the resulting document

Cons

  • This is only available to Word documents
  • When a document is open in Word online in view mode, sometimes the document property value is not shown in the document
  • Be careful, documents content updates when you update the metadata. If you need a snapshot of what the document looked like at a certain time, save a PDF version

Power Automate

What is it?

Power Automate is a tool which can connect to multiple sources (such as SharePoint, Salesforce, Dynamics or even Twitter), which can be used in the creation of flows.

Each flow has two key components:

  • A trigger: how the flow is started which includes options such as when a document is created, when an email is received, or when a SharePoint list item is updated
  • An action: what the flow does once it has been triggered, which includes options such update document properties, get email attachments or create SharePoint list item among others.

It’s important to note that Power Automate will support quite a few of the options outlined in this article for document generation. This entry is on the populate a Word Template action which is part of the premium offering.

When to use it?

When information needs to be pushed into a document, particularly as part of a flow or if the resulting document needs to be a PDF (for example, a contract document). In the case of the contract generation, the details of the contract are entered into a Power App which is then routed for approval. Once it is approved, Power Automate populates a contract document template with the provided information (customer name, contract start and end dates) and converts it to PDF.

As a last step, Power Automate routes the document for signing using actions from an electronic signature platform (like Adobe Sign or DocuSign).

Pros

  • Part of the existing Power Platform offering – no additional set up required
  • The resulting document can be uploaded into a library or attached to an email and sent out
  • Similar to other solutions listed, the Word templates live in a SharePoint online library and can be updated using the Word desktop application
  • The Word Power Automate action set includes two actions; one to populate a Word template, the other to convert it to PDF

Cons

  • It requires a premium license for anyone who wants to generate a document
  • There is an ongoing activity to manage the permissions of the templates to ensure they are only edited by specific users
  • Only supports Word documents (Excel documents can be populated by inserting rows of data into a pre-determined table in the spreadsheet)

Microsoft Syntex

What is it?

Syntex is a new offering from Microsoft which can be used to create modern templates with placeholders for text in a document. These placeholders are populated by you entering data in a small form (shown on the right below), which can connect to a list or metadata term set.

In the example below, the contractor name and address are populated from a SharePoint list. Once the contractor name is selected, the address is automatically populated and set. The modern template can then be automatically populated by Power Automate in a flow using the new Generate document using Syntex which is currently in preview.

When to use it?

This is an excellent tool to use when you need the flexibility for employees to select data directly in a document, or where automatically generating a document would be beneficial.

For example, generating a SOW or a contract with a customer, where there may be a process for a new customer to be set up or you may want to send something out to an existing customer.

For the new customer, the Power Automate flow is a great tool to get the new customer set up (you may want a Team created for the customer or you may want them set up in Dynamics).

The manual pathway is great when you want to send something out to an existing customer – where in the past you may have completed a SharePoint form or had to trigger a workflow, this way the document can be created without needing the flow to run.

Pros

  • Templates are easy to create and update as new columns are created
  • Supports conditional sections where rules can be applied to show/hide parts of the document as needed
  • When Power Automate is not being used, a table can be inserted into the template and populated by SharePoint list data

Cons

  • You will need to set up pay as you go billing for Microsoft Syntex, where the cost is for each document created. At the time of writing, this is a price of 15 cents per generation
  • Only supports Word documents
  • Images and tables are not supported by Power Automate, but can be added otherwise
  • The Power Automate only works: When an item is created, when an item is created or modified, when an item is deleted

3rd party solutions – Encodian

What is it?

Encodian is a third party product which integrates with Power Automate and has an action allowance included with each subscription level, which includes a free tier that includes up to 50 actions per month. It uses tokens in a document (such as <<Title>>) which are populated by a JSON passed through to the action in Flow.\

Shown below are a selection of the actions available with Encodian.

When to use it?

It’s great to use when not many flows need to generate documents without the additional financial investment, or to utilise other tools in the Encodian platform (such as add attachment to PDF or add a watermark to Word or PDF).

Pros

  • Integrates with Power Automate – no additional logins needed
  • Images can be inserted dynamically
  • Both Word and Excel spreadsheets are supported

Cons

  • The data inserted into the document is provided as a JSON string – this may be fiddly to update as the token in the document must match the JSON
  • There is an additional subscription cost for this product

3rd party solutions – Plumsail

What is it?

Plumsail is a third party product which integrates with Power Automate and has a document generation allowance included with each subscription level. The lowest tier, Folder, will support generation of 200 documents monthly which at the time of writing is $25/month. If more documents are needed you may need to move to a higher tier such as Drawer which will allow 1000 documents a month ($84/month at time of writing). Additional document generations can be purchased as needed in batches of 100 generations. The Plumsail pack is a set of actions available in Power Automate, which can be added into any flow once a subscription has been set up.

Similar to other options, Plumsail uses typeable placeholders (e.g. {{Title}}) to indicate where data will be inserted. In the flow, JSON is passed to the action which includes all the data to be inserted into the document.

Document templates use content controls with names to indicate where data is inserted and what it should be named in the JSON.

When to use it?

It’s a great solution if there are other actions in the offering which can add value, such as add watermark to PDF or Split PDF.

Pros

  • Integrates with Power Automate – no additional logins needed
  • Documents can be easily updated using the desktop apps and content controls
  • Plumsail does have a Form option as well which can be externally facing
  • Document generations can be purchased as a one-off if needed

Cons

  • Only works with Word documents
  • Updating the JSON may be tricky to keep everything aligned and working
  • There is an additional subscription cost for this product
  • The supporting documentation suggests it can perform document generation with Excel and Google Sheets, but this leverages standard Power Automate actions of ‘add row’ to insert data
  • The supporting documentation suggests it can perform document generation with a PDF however this process creates a Word document and then saves it as a PDF using out of the box actions

3rd party solutions – Muhimbi

What is it?

Muhimbi is a third party product which integrates with Power Automate and does not generate documents, but can:

  • Convert documents or SharePoint pages to PDF
  • Add a watermark to documents
  • Merge or split documents

There are some different subscription plans for this product which includes a free tier, which supports most actions but does not support extraction of data from a PDF document.

When to use it?

This is a great one to use when you need to work with PDF documents using Power Automate, such as merging or splitting document or you need to extract text from a completed PDF form.

Pros

  • Similar to other offerings, this integrates natively with Power Automate and can be used in Flows once a subscription has been purchased
  • Data from a PDF form can be extracted and processed using Power Automate
  • As part of a flow, multiple PDF documents can be merged into one document
  • A wide variety of file types is supported for conversion to PDF including HTML, Email, PPT, SharePoint list or page and MS forms

Cons

  • Data cannot be inserted into a document template from a SharePoint list (as an example)
  • There is an additional cost to license this product.

3rd party solutions – Nintex

What is it?

Nintex is a third party cloud product which includes document generation allowance in the subscription. It uses a set template and the ‘Nintex tagger’ (shown below) which generates tags to paste into your template (e.g. <<Title>>). The tagger is easy to use and the tags can be copied or typed as needed.

When to use it?

  • When you already have this in your environment or are planning to add it to your environment
  • If your organisation does not want to use Power Automate

Pros

  • The tags generated by the tagger are plain text and can be typed or copied and pasted into multiple places (e.g. <<Title>>)
  • Can combine multiple documents into one final document, however not all need to have extra text inserted
  • The resulting document can either be the original file type or a PDF
  • Can generate Word, PowerPoint or Excel documents
  • There is a salesforce specific document generation product

Cons

  • There are additional costs – the Nintex license which includes some document generation runs. For example, the base license Pro ($35,000/year) includes 2,000 document generations per year however if you need to generate more documents in a year you may need to either move to the next plan of premium ($70,000/year) or liaise with Nintex for a custom plan
  • Is not natively integrated with Office 365, so anyone creating Nintex flows will require Nintex Cloud login details
  • There is an ongoing activity to manage the permissions of the templates to ensure they are only edited by specific users

Community solutions

What is it?

These are solutions other developers have created and shared via a platform like GitHub for the use and enjoyment of anyone else facing the same issue. Usually, they use out of the box actions functionality or some custom dev which is also provided to you. For example, there is a great PowerApps one floating around which generates the HTML you need to include the Fabric UI icons in your Power App – great way to customise your Power App with no extra cost.

They are usually free of charge and provided ‘as-is’ without support.

When to use it?

There are some great solutions out there which can save work and frustration in the long run. If you find one that works, use it!

Pros

  • They are free of charge and usually out of the box functionality
  • These solutions can be great accelerators in getting a solution going, particularly if you need something tricky or unusual

Cons

There is no support for these solutions if there is an issue which may lead to more work in trying to get it working vs. building your own solution

Power Automate direct-to-PDF

What is it?

Using standard actions in Power Automate, you can generate a HTML document and convert it to PDF. The Flow uses a complicated series of find and replace actions to update placeholders in templates with actual values provided from a data source (for example, a SharePoint list, a PowerApp or any other data source).

When to use it?

This option should be used when no additional licenses or products can be purchased.

Pros

  • These Power Automate actions are included in most Microsoft/Office 365 licenses
  • A template can be passed to the flow and used, rather than other solutions where the template must be pre-set.

Cons

  • Can be time consuming to implement
  • As the flow is replacing specific placeholders (such as [Customer Name]), adding in new tags or updating the templates may require significant updates to the flow

Dynamics 365 / Model-driven Power Apps templates

What is it?

Model-driven PowerApps can be set up to invoke flows as part of the process flow, this can leverage the populate a Word template flow action to generate a document from the data in the model driven app.

When to use it?

If you already have a model driven app or dynamics instance which is producing the data and you need it in a document – perfect!

Pros

  • Native Power Automate functionality
  • No additional costs (requires the same premium license as the model driven app)

Cons

  • While the document is being generated, it may look like the app is not doing anything.

Word templates & Model-driven apps

What is it?

A template which is created inside a model-driven app which can then be populated with values from the app as needed (without the need for an additional flow). An example template is shown below.

When to use it?

When you have a model-driven app already in place and want to generate documents based on the data without any data manipulation (no Flows are required to create the data).

Pros

  • There are some sample templates available for testing
  • Doesn’t require a flow or any additional licensing
  • There are permission controls in place already – only System administrator and System customizers can create templates
  • Tables are supported and can be populated using repeating sections in Word

Cons

  • Setting the template up can be tricky – there are a few steps involving working with the XML settings of the document
  • There is a known issue which can cause Word to freeze while the template is being updated such as changing the capitalisation or adding text to a content control

Like what you see?

There’s a lot to remember when it comes to document generation, which is why we’ve created this quick cheat-sheet for you to download. It summaries everything we’ve covered today with the pros and cons clearly listed so you can make the right choice for you. Download it here.

Still not sure which one to use? Seen something that looks great, but no idea where to start? Let’s chat to help you find the best solution for you.

Get in touch

About the author

Katherine Collins is a certified business applications consultant at Engage Squared, who is new to the company but has spent the last few years working closely with companies in a few different industries (FMCG, non-for-profit and consulting) to help them get the most out of SharePoint and the Power Platform. Katherine loves helping to streamline the internal work processes and make people’s jobs easier. Katherine is based in Melbourne with her Samoyed and on the weekend you can find them both in the garden (Katherine working and her dog supervising).

Can’t keep track of document management? Download our free handy cheat-sheet.