Contact Us Today!

Use Power Automate and JSON to populate Document Tables

Use Power Automate and JSON to populate Document Tables

In a previous blog, we covered how you can populate a Word document template using Power Automate.  In addition to populating plain text fields in a doc, you can also Use Power Automate and JSON to populate Document Tables using the Repeating Section Content Control. Keep reading to see how.

What is Power Automate?

Formally known as Microsoft Flow, Power Automate is Microsoft's code-less tool designed to automate your business's repetitive and manual tasks.  With Power Automate, you can:

  • Automate business processes.
  • Pass data between nearly every application in the Microsoft Stack.
  • Connect to any publicly available API.
  • Automatically send reminders and create events for your business.
  • And much more!

Click here for countless examples of how Power Automate can fit your business needs.

Using 'Repeating Section Content Controls'

If you want to create a static table in Word and fill it with data, all you have to do is insert a new table in your doc, and add Plain Text Content Controls in each cell:

Then, you can populate those controls from Power Automate.

If you don't know the number of rows ahead of time, you can use the Repeating Section Content Control.  Highlight 1 full row of cells, then insert the Repeating Section Content Control:

Now your row is wrapped in the control and you will see a new input in your Flow step:

All that is needed now is to populate this input with some JSON data! Consider the following JSON Array example:

[
{
"Account": "ABC Construction",
"Primary Contact": "Mike Green",
"Annual Revenue": "$10,000.00",
"Status": "Active",
"Owner": "Sarah Blue"
},
{
"Account": "Corey's Company",
"Primary Contact": "Corey Williams",
"Annual Revenue": "$8,500.00",
"Status": "Active",
"Owner": "John Red"
},
{
"Account": "XYZ Group",
"Primary Contact": "Janet Orange",
"Annual Revenue": "$11,000.00",
"Status": "Inactive",
"Owner": "James Black"
}
]

Click here for an explanation on how JSON works in Power Automate.

Using this data, we can expect to see 3 rows added to the table, each containing values for the 5 columns we added:

This feature makes it easy to pass data into a table and dynamically build a list of rows for reports and other document types.

Get in touch with Beringer Technology Group today!

Our team has deep expertise in all things Dynamics 365 and Power Platform, including how to use Power Automate and JSON to populate document tables. If you need help using this or other functionality in Dynamics 365 or Power Platform, reach out to our team today.

Beringer Technology Group, a leading Microsoft Gold Certified Partner specializing in Microsoft Dynamics 365 and CRM for Distribution also provides expert Managed IT ServicesBackup and Disaster RecoveryCloud Based Computing, Email Security Implementation and Training,  Unified Communication Solutions, and Cybersecurity Risk Assessment.