• Release History
  • Documentation
  • Back to www.mscrm-addons.com
  • Release History
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)/Integrating JSON data into documents

Integrating JSON data into documents

6778 views 2 Updated on January 29, 2025

By leveraging JSON format data, you can include information that goes beyond the confines of your Dataverse (Dynamics 365 environment) into your documents. This article covers preparing templates to support your JSON schema and integrating JSON data into documents using the Create document action of our Connector for PowerAutomate. 

To begin, we will walk through the steps needed to add your schema to your template and insert your data into a Flow.  Later, an example will demonstrate these steps in practice. 

Prerequisites: 

  • DocumentsCorePack Template Designer version 10.40 or higher  
  • DocumentsCorePack Server version 2020.134 or higher. 
  • A SettingsKey must be added to your environment with the following values: 
    • Name: EnableExternalJsonDesigner 
    • Value: true
    • Product: DocumentsCorePack 

NOTE: For more information on how to create a SettingsKey, please click here. 

Step-by-Step tutorial: Integrating JSON data into documents

Step 1: Prepare your template by adding a JSON schema 

The JSON tab can be found in the DocumentsCorePack Template Designer.   

json tab
Figure 1: The JSON tab

Under this tab, you can add your schema by clicking the Add Queries button.  In this window, you can either manually enter your schema, or you can click on Open schema file to open up a file on your computer. The Single Row Query can be enabled if the schema represents only a single row of data.  Leaving it disabled will indicate that the schema should represent a table. 

NOTE: Enter only the schema here. Add the JSON data into a Flow, as shown in a later step.

example json schema
Figure 2: Some example JSON schema

Adding the schema updates the field list to include your new fields. You can add these fields into your template just like normal fields. 

updated fields list
Figure 3: Updated fields list

With this, your template is now able to accept data based upon your specified JSON schema. 

Step 2: Generate documents including external JSON data via a Flow 

JSON data can be passed to your document in a Flow throught our DocumentsCorePack Connecter. After adding the Create document (sync) (V3) step to your Flow, clicking on Show advanced options will display the JSON Datasource field. Add your JSON data here.

create document with JSON datsource
Figure 4: The Create document (sync) (V3) action, with JSON Datasource highlighted

 

Example 

We want to create a template that contains a small message to address a customer.  This template will include fields that will come from our JSON schema. 

To begin, we will open Word and bring up the Template Designer.  Under the JSON tab, we will select Add Query and enter our desired JSON schema. Adding the schema updates the fields list.

json window with schema
Figure 5: JSON Data Source window with our schema

 

Integrating JSON data into documents
Figure 6: Updated fields list

We can then add our fields to our template. Our First Name, Last Name, and Weeks until next contact fields can be added normally. Our Signature field, however, is an image field, as we will be passing in a Base64 string to represent our image in our data later.  To add this field properly, we can add this field using the Insert as Picture Field option under the Insert Field submenu. 

Integrating JSON data into documents
Figure 7: Insert Field menu with Signature field highlighted

With our fields added in, we can save our template. 

Integrating JSON data into documents
Figure 8: Our template

In the Flow, we specify the data we want to pass in the Create document (sync) (V3) step. 

Integrating JSON data into documents
Figure 9: The Create document step with our JSON data in the JSON Datasource field

Finally, we run our Flow in our environment.  The resulting document contains the data we passed in from the JSON Datasource field. 

Integrating JSON data into documents
Figure 10: Our final result

 

That’s it! We appreciate your feedback! Please share your thoughts by sending an E-mail to support@mscrm-addons.com. 

Was this helpful?

2 Yes  1 No
Related Articles
  • Ensuring correct time zone display for DateTime fields
  • How to compare a date-fields with the current date 
  • Create a template for XML or plain text
  • E-Invoicing with DocumentsCorePack
  • How to add content from SharePoint to a document
  • Using MS Word field codes in DocumentsCorePack templates
Latest Articles
  • DocumentsCorePack: Best practices for Dynamics 365 on-premises to online migration projects
  • Multilingual Support in DocumentsCorePack
  • Recap: ColorCloud 2025
  • Configure DocumentsCorePack within custom pages
  • AI-Powered Document Generation with Copilot in Sales
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How to find your environment’s unique name in Microsoft Dynamics 365
  • How licenses are counted
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How licenses are counted
  • How to insert Condition Fields in DocumentsCorePack Templates designer
Categories
  • *News and General Infos* 62
  • Webinars 44
  • Template Designer(DCP 196
  • DocumentsCorePack(DCP 250
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 72
  • PowerSearch (PS 50
  • ActivityTools (AT 61
  • SmartBar (SB 54
  • GroupCalendar (GC 47
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2022 www.mscrm-addons.com. All Rights Reserved.