Tuesday, 10 May 2022

Automate creation of new documents with SharePoint Syntex Content Assembly

With the recent Content Assembly feature, SharePoint Syntex can now create templated documents as part of an automated process - all native to Microsoft 365. This is an important part of intelligent automation since so many processes involve a document - in the consumer world your mortgage documents, an insurance quote, a letter confirming a policy change and so on. While financial and ERP systems often take care of invoices, sales orders and purchase orders, the business world revolves around proposals, contracts, safety reports, compliance certificates, checklists, affiliate agreements and many other types of standard document. I know what you're thinking - sure, there have always been ways to automate document creation, but custom code or a 3rd party product have typically been needed. Often these solutions have been very expensive indeed, such as some of those for intelligent proposal generation. 

Another significant thing here is that I don't remember ever seeing a solution 100% baked into the core Microsoft experience in such an intuitive way - that means potentially everyone in the organisation can make use of automated document creation, and without training on specialist tools. This combination of things that make me believe that what Microsoft are doing with Syntex (and the journey they're on with Content Services in general) is extremely significant in the market. 

Scenario used in my example

Before I dive into showing how Syntex Content Assembly works, some details on my scenario - here I want to easily create documents for different open roles here at Content+Cloud. We have no less than 100+ open roles at the moment and these documents are used in internal hiring and to brief external agencies, so simplifying the creation of these documents and reducing the copying and pasting that people currently is a big win. The documents combine variable content (the role details) with standard content (our benefits and working environment etc.) Using Syntex Content Assembly, we can automate the document creation and Syntex ensures the respective details for the role are dropped into placeholders in the template. 

Let's start with the fundamentals.

Syntex Content Assembly ingredients
Understanding how Content Assembly works starts with understanding the two main ingredients needed:
  • A SharePoint list - this will contain an item for each document instance to create, with the values to drop in
  • A 'modern template' - this is an Office document specially created with Syntex support, providing the outer template for the document


Creating a Syntex modern template

Step 1 - creating the list


Since you'll automate the creation of documents from items in a SharePoint list, the first thing to do is to define and create that list. In my case it's a list for our open roles and I've added SharePoint columns for the variable pieces of information which will be dropped into the documents:  

It's very important to have this list available and ready (at least it's structure and columns) before going to create the modern template. The reason for this is because the template creation process involves you picking the columns and specifying the location in the document where this information should display. 

Step 2 - creating the template itself


To do this you'll need a user with a Syntex license. A licensed user will see a new option in a SharePoint document library to create a modern template:

Have your Word document ready when you click the item above - but note that it can be a "filled" version of your document rather than a specially prepared template. You'll upload it from your PC rather than select it from an existing SharePoint location:

Once your document has been selected we go to the next phase.
Adding content placeholders to the template
At this point you'll see a panel on the right which will help you drop the placeholders into the document template. Simply highlight some text and then the 'add placeholder' control appears on the right:

The placeholder control asks you to name the placeholder and specify what should be dropped into it when new documents are created from the template. There are two options here:

Text shown Use when
Enter text or select a date The user should enter some new text as each document is created from the template
Select from choices in a column of a list of library The text should be pulled from the list item as each document is created from the template

For the most part you'll probably be using list item values for the vast majority of values dropped into your documents - adding text ad-hoc may be useful sometimes but the real power is in more automated creation from your structured data. Let's look at each in more detail:

Option 1 - entering an ad-hoc value

When creating the template, you'll specify what kind of data can be used for this value, but note this isn't adding any kind of column to the list containing your list items - it just constrains the data that can be entered:

When using the template, a control is presented to the user (matching the data type) to allow the ad-hoc value to be entered:

Option 2 - selecting from a list item

Using this approach, when creating the template you'll browse to the SharePoint list you're using a choose the column which holds values for this 'field' in the document:
First choose the list:
...and then the column:
Once selected you'll see confirmation of the selected column, including if you come back in later to edit:
When using the template, once the user has selected an item in the list for the document instance being created, Syntex will automatically fill in this placeholder from your list item - as it will do for ALL of your placeholders in the document. A placeholder which is bound in this way can't be overtyped, but that makes sense because you are creating the document from a 'record' in your list:

Finalising the template
The template creation process from here is essentially repeating the above steps for each placeholder you need in your template. For each placeholder, either select that the value should be entered ad-hoc or (more likely) pulled from the list item. Once this is done you'll have lots of placeholders in your template, with each one listed on the right-hand side showing where the value will come from:
At this point the template can be published. Hit the publish button and see the confirmation:
So once we have the template in place, what does creating a document look like?

Creating documents using Syntex Content Assembly


At this point all of the one-off, upfront work to create the template is done - so creating new document instances from the template is quick and easy. No more copy and paste between documents! The critical point to note here is that currently document creation does involve a manual step. I think we can be sure that Power Automate actions will be here very soon to provide end-to-end automation, but for now here's how the process works - your Syntex modern template appears on the 'New' menu for your SharePoint document library:
Selecting the menu option takes you into creating a document instance from your template:
You can give the document a name (the default is the template name) using the editable name highlighted with the red arrow. On the right-hand side, all the placeholders are currently empty - the only reason the document in the image below has content is because in this case my template has content in it (as opposed to empty placeholder values). In any case, they will be overwritten in the next step. To create a document using one of my items in the SharePoint list, I simply choose a field (most likely the title field) and I see a picker of my list items:
Once an item is selected, all values are pulled from the list item and dropped into the corresponding placeholder in the document. You'll need to hit the 'Refresh to preview' button:
The document is now created!


As you'd expect, it lands in the document library where you created and applied the modern template:

So what do we take away from this?

 
The significance of Syntex Content Assembly
What we're seeing here is another big step in the democratization of automation solutions. Sure, there's some complexity as you get used to Syntex Content Assembly, but for the first time it's completely native and baked into Microsoft 365 (specifically the SharePoint document library interface) and doesn't require any coding, scripting, or complex configuration.

Every single organisation today has people copy/pasting into documents - statements of work, project plans, legal agreements, sales pitches, supplier/partner/employee contracts, role descriptions, and many more. In the best-case scenario, a lot of time is being wasted. In the worst-case, human error can creep in and in some cases can have a serious impact on work and people. With Syntex Content Assembly, Microsoft is making a serious play in document automation for the masses - and a segment of specialised product vendors are likely be worried.

Today there are quite a few limitations. A couple of clicks are needed to create the document (so arguably not full automation), there's a one-to-one relationship between the template and a document library, and for now it's only Word. Additionally, in my experience Syntex is a bit finicky in terms of what can be in your Word template. These are worth discussing in more detail, so I'll cover these and more in my next post: