Pragmatic Works Nerd News

Inserting Dynamic Tables (Repeating Sections) into Word Templates from Power Automate!

Written by Nate Halliwell | Jun 21, 2026

In this tutorial, Nate Halliwell from Pragmatic Works dives into how to insert dynamic tables—also known as repeating sections—into Microsoft Word templates using Power Automate. This feature is particularly useful when automating document generation based on lists of data such as assets assigned to employees. Nate walks through a real-world example using an asset tracking scenario.

 

📄 Scenario Overview

The example focuses on sending out monthly or yearly asset summary reports to employees. Each employee receives a Word document listing the assets in their possession along with due dates for return.

🔧 Setting Up the Word Template

  1. Begin with a simple Word document that includes a placeholder for the employee name.
  2. Enable the Developer tab in Word (if hidden, it can be activated through Word settings).
  3. Convert the "Insert Employee Name" placeholder into a Plain Text Content Control and rename it to full_name.

📊 Creating the Repeating Section (Table)

  1. Insert a 3-column table with headers: Asset Type, Manufacturer, and Due Date.
  2. For each column in the second row, insert a Plain Text Content Control and name them:
    • asset_type
    • manufacturer
    • due_date
  3. Select the entire second row and wrap it inside a Repeating Section Content Control.
  4. Name the repeating section asset_items.

📁 Preparing JSON Arrays

To feed data into this repeating section, you need to pass a JSON array from Power Automate. Nate suggests using Notepad to draft the JSON structure matching the Word field names. An example array item would look like:

{
  "asset_type": "Tablet",
  "manufacturer": "Trey Research",
  "due_date": "2024-12-31"
}

⚙️ Configuring Power Automate Flow

The Power Automate flow works with two SharePoint lists:

  • Asset Holders: List of employees
  • Asset Manager: List of assets and assigned users

Steps in the flow:

  1. Get all asset holders.
  2. For each asset holder, filter the Asset Manager list using OData query to retrieve only their items.
  3. Initialize an array variable before looping through their assets.
  4. Append each asset as a JSON object to the array.
  5. Reset the array before each loop to avoid carrying over previous data.

📝 Populating and Sending the Word Template

  1. Use the “Populate a Microsoft Word template” action in Power Automate.
  2. Map dynamic fields like full name and asset items.
  3. Switch to Array view for the repeating section and insert the array variable (var_items).
  4. Send an email with the populated Word document as an attachment, personalized for each employee.

💡 Best Practices from Nate

  • Keep field names consistent between the Word template and the array keys.
  • Use Notepad or another simple editor to build out JSON arrays before inserting them into Power Automate.
  • Reset your array variable inside the outer loop to ensure correct data assignment per employee.

This walkthrough helps automate document generation at scale using Word templates and Power Automate. By leveraging repeating sections and dynamic arrays, businesses can save time and reduce manual errors in recurring reports or correspondence.

Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Automate and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.