Article published on the 26th of May, 2025.
Contents
1. Introduction
In this article, we will explore an example where we create a WorkPoint Automate process which can be used to create one or multiple documents from templates using very few steps.
Creating documents from templates is very common in WorkPoint solutions, and having the option to create more than one in a single process has the potential to speed up many different kinds of work processes.
For this demonstration, we are going to start from a point where we have already done the following tasks:
- Enabled the "Document Sets" site collection feature on the root site of the WorkPoint solution
- Created a couple of different document templates with mail merge fields for our Customers business module
We will create a WorkPoint Automate process using the following steps:
- Search form (to select the document templates we want to use for creating new documents)
- Create documents, folders and items (to create the new documents based on the selected templates)
For preparation for this demonstration, we have already performed the following steps:
- Enabled the Document Sets site collection feature on the root site, so that we can create document sets containing our various document templates in the template library.
- Created document sets for Customer- and Project related document templates
- Created a selection of document templates containing various mail merge fields
Our template library looks like this:
Inside the Customer templates document set, we have the following:
Inside the "Plans" document set, we further have a couple of customer related document templates.
2. Configuration
Here we have already created a user process called "Create documents from templates":

First, we will add the Search form step:
- We have added the Search form to the process.
- In the General tab, we have set "Allow multi select" to Yes, because we want to be able to select multiple templates and create a document based on each selected template. We have also set "Allow continuing without selection" to No.
- We have added a search configuration of type "Templates" and titled it "Templates".
- In the "List" field we have selected our template library containing document templates. In this case, we use the standard template library provided when we installed the WorkPoint solution.
- In the "Default view" field, we have selected the "All documents" view.
With this form, we can now browser through our template library and select one or more templates, which we can then pass on to other steps in the process.
Next, we add the "Create documents, folders and items step:
- In the Step Input of the Create documents, folders and items step, we select the output from the Search form.
Next, we configure the settings in the Options tab as follows:
- In the "Business module" field, we specify the business module containing the entity on which we want to store the newly created documents from templates. In this instance, we select the Customers module to begin with, but eventually we will set this to "BusinessModule.Id" from the process context, so that the process can be used on all our business modules.
- In the "Entity" field, we specify on which entity we want to store the newly created documents. In this instance, we select "Entity.ID" from the process context, meaning the documents will be stored on the Customer site from which we run the process. Once we set the Business module setting to "BusinessModule.Id" from the process context, Entity.ID will refer to whatever entity site from which the process is run, regardless of which business module it resides on.
- In the "List" field, we select in which list or library to store the new documents. Since we eventually want this process to be able to run on any business module, we need to select a list or library that actually exists on all business modules. In this case, we select the "Documents" library, as that one is fairly standard across all modules and scenarios.
- In the "Output exists behaviour" field, we select the "Rename" option. This ensures that if the step tries to create a new document with the same name as one that is already in use in the given location, the new document will be created with a number appended to the end of the name, e.g., "New document (1)".
- In the "Include folder content" field, we select "Yes". As we saw in the introduction, we are using document sets and nested document sets. With this setting set to "Yes", if we select a document set in the Search form, this step will create the document set along with all nested document templates, and merge relevant metadata into the merge fields. Note that if the Document Sets site collection feature is not enabled on the target entity site and list/library, the document set will be created as a standard folder instead.
- Lastly, we click the "Map fields" button, which maps all the fields on the selected list or library to "Element.[field]". For example, the Title field will be mapped to "Element.Title", and the Name field will be mapped to "Element.FileLeafRef". By doing this mapping, the data from each selected element, or in this case document template, from the Search form, will be input into the corresponding fields when they are created. We can overwrite these values by replacing the mappings with either context data or an adaptive expression if we wanted to, but in this instance, we will keep the default automatic mappings.
Here's an example of how our automatic mappings look:

At this point, we can set the Business module field to "BusinessModule.Id" by selecting it from the context:
We can now save and publish our process.
We will then create a My Tools button with the following configuration for running our process, in this case from Customer sites:
With this button, we can now try and execute the process and see the results.
3. Execution
Let's run our Create documents from templates process and create some templates:
- We click the button we set up to run our process.
- Our Search form opens, and we select the top level Customer templates document set. This document set contains a document template, as well as a nested document set with other templates inside.
- Next, we click the "Continue" button.
The Create documents, folders and items step now runs and creates our document sets and documents:
Once it is finished, we are presented with the following window:
We can now close the process and refresh the page.
- Our Customer templates document set has been created (as a folder, because Document Sets is not enabled on this site collection).
Let's open the Customer templates document set and see what's inside:
- Our "Customer NDA" document has been created from our template. Let's take a look inside the "Plans" folder.
- Inside the Plans folder, we have two documents created from templates. Let's open the Customer development plan document and see if our customer data has been merged into it:
Looks like our data has been correctly merged into the documents created from our templates.
We can also simply select multiple document templates in our search form - we don't necessarily need to select a document set:
- In this instance, we have selected the two templates inside our "Plans" document set (but not the document set itself).
- Next, we click the "Continue" button.
The two documents are now created in the Documents library:
Comments
0 comments
Please sign in to leave a comment.