Word - Populate

Power Automate Connector: Encodian – Word

Overview

The 'Word - Populate' Power Automate action enables you to populate a Word document (DOCX) with data derived from a JSON document.

How Word Templates Are Created

To use the 'Word - Populate' action, you must first create a Word template containing placeholder expressions. These placeholders are replaced with values from the JSON data provided at runtime.
Templates can be created manually using the template syntax or generated visually using Encodian Templater.
Typical workflow:

  1. Create a Word template
  2. Add placeholder expressions (tokens) manually or with Encodian Templater
  3. Pass JSON data and Word template into the 'Word - Populate' action
  4. Generate the final document

Build Templates Visually with Encodian Templater

Encodian Templater is a free Microsoft Word add-in designed to simplify building templates for the 'Word - Populate' action. 
Instead of writing template syntax manually, generate it visually inside Microsoft Word using representative JSON data.
With Templater, you can:

  • Generate 'Word - Populate' tags automatically  
  • Build conditional logic using a visual interface  
  • Create arithmetic expressions  
  • Generate table loops from collections  

Templates created with Encodian Templater can be saved and used directly with the 'Word - Populate' action.
Learn more about Encodian Templater →

Example Flows

Please refer to the following example solutions:

Video Tutorial

Please refer to the following YouTube Video we published: Advanced Scenarios Populate a Word Document with Power Automate

Populate Word Document Syntax

Please refer to these articles providing detailed guidance and examples for configuring the input Word document and JSON document (data): Template Syntax for Populate Word Document

Please also refer to our Template Design forum, where our support team can help with template syntax / you can see solutions to common use cases.

Word Template Library

Please find example word templates for common scenarios within the 'Template Library'

Credit Count

This action consumes 1 credit per operation.

Note, different Encodian actions can consume different numbers of credits. Please always check the action-specific documentation and read What is an Encodian Action for a full description of how credits are consumed.

Default Parameters

The default 'Word - Populate' flow action parameters are detailed below:

  • File Content: The Microsoft Word Document (DOCX) to populate.
  • Document Data: The JSON data to populate the document with.

Please refer to the Obtaining the 'File Contents' Parameter article for guidance on how to obtain a 'File Content' parameter ready to provide to an Encodian flow action.

Advanced Parameters

The advanced 'Word - Populate' Power Automate action parameters are detailed below:

  • JSON Parse Mode: Sets the JSON parsing mode for simple values (null, boolean, number, integer, and string).
    • Standard: JSON simple values are determined upon parsing of their string representations. For example, '{ "example": "69" }' is determined as an integer in this mode.
    • Strict: JSON simple values are determined directly from the JSON notation. For example, '{ "example": "69" }' is determined as a string in this mode.
  • Allow Missing Values: Sets the engine to allow missing values within the 'Document Data'
  • Remove Empty Paragraphs: Sets the engine to automatically remove any empty paragraphs upon execution
  • Inline Errors: Produces errors within the resultant document as opposed to rejecting the request with an HTTP 4** error
  • Date Time Formats: Set one or more specific formats for parsing DateTime values.
  • Culture Name: This setting is used to set the culture for the document prior to conversion. Please refer to the Culture Names article for a list of supported cultures
  • Time Zone: Set a specific time zone for date and time processing.

Return Parameters

The 'Word - Populate' flow action returns the following data. 

Action Specific Return Values

  • File Content - The populated Word document (Base64)

Standard Return Values

  • OperationId - The unique ID assigned to this operation.
  • HttpStatusCode - The HTTP Status code for the response.
  • HttpStatusMessage - The HTTP Status message for the response.
  • Errors - An array of error messages should an error occur.
  • Operation Status - Indicates whether the operation has completed, has been queued or has failed.
Have more questions? Submit a request

8 Comments

  • 0
    Avatar
    Marco Aurelio Caldas Miranda

    Having trouble finding the option "Date Time Format". The output document is displaying the date in the wrong format. I've checked the input JSON (omitted below) has the correct date format. How can I disable parsing of DateTime values?

  • 0
    Avatar
    Jay Goodison

    Hello Marco - Please review the following article which details how to control DateTime formatting https://support.encodian.com/hc/en-gb/articles/360020648597-Expression-Results-and-Formatting 

    You can disable automatic formatting by entering 'Disable' into the 'Date Time Format' property.

    Edited by Jay Goodison
  • 0
    Avatar
    Len Cardinal

    The three parameters in the article: Inline Errors, Allow Missing Values, and Remove Empty Paragraphs appear to be a single enum parameter now, "Population Options". How do I select multiple values? (Apologies if this is a Power Automate basics question...I tried the verticle pipe operator |... )

  • 0
    Avatar
    Engineering Projects

    Hello Encodian.

    I followed your instruction to add HTML into the word docx.

    I have included IMG with data64 in the HTML, but the result is not satisfactory.

    The image will be default as in line with text, which hide most of the image, showing a little bit of the bottom image.

    Will you have any suggestion on changing the code? Will CSS style fix this issue?

    Thank!!

  • 0
    Avatar
    Jo Hall

    Hi,

    I believe this is the same question you have asked on Inserting HTML – Encodian Customer Help, I have provided an answer there;  if I am incorrect please advise. 

  • 0
    Avatar
    Ousman Touray

    Hi,

    I got two questions:
    1)  How do you create a table with data by defining json? I want to create a table that does not exist in it from before, and fill it with data from the flow
    2) How do you insert a new line with text that is already formatted as Header 1 or Header 2? I want to create a table of content in the end

  • 0
    Avatar
    Len Cardinal

    Hello,

    Is there a size limit for the JSON payload? I am looking at probably up to 3MB but maybe up to 5MB

    Thanks.

  • 0
    Avatar
    Jo Hall

    Hi Len Cardinal 

    There is no separate size limit for the JSON payload, you should be fine passing 5MB. 

    The size restriction on the action will be for the entire message size i.e template + JSON, this needs to be under 100MB.

    Power Automate Error - Maximum Buffer Size Exceeded

Please sign in to leave a comment.
Powered by Zendesk