Friday, July 31, 2020

Save Populated Word Template Content in Variable Using Power Automate


Introduction: We had a requirement where based on switch case condition, we had to populate different word templates.
Power automate Action used was Populate a Microsoft Template. Since we did not want write the actions check SharePoint folder and create file in SharePoint with populated template content, we tired to store the content in an Object Variable.

However, that corrupted the content. ( To understand how to populate Word Template using Power Automate check my blog - ).

Solution:
  1. Add Action Compose and store the populate Microsoft Word Template content in that.
  2. Now store the Compose Output in the variable of type Object.


Output:


Populate Repeating Control of Word Template using Power Automate


Introduction: Power Automate makes it easy to populate word template, we can have table (Repeating control) that can be populated using Power Automate, For information on how to create and Populate Word Template- Refer my Blog: https://www.exploringdynamics365.tech/2020/07/create-and-populate-word-template-using.html

Steps:
Create a table and add content controls for each cell.


After adding content controls, select the entire row and add repeating control.



In Power Automate initialize an array Variable, Use append to array action and create the table you wish to populate in the Word Template.
Note: Value for the array variable will be {"title in content control properties" : "actual value"}

In Action populate the word template, you will see repeating control, Change the form to accept an array input, by clicking on the symbol highlighted in below screenshot.


Now Add your array as input in populate word template action.



Save Populated Word Template Content in Variable Using Power Automate

Introduction : We had a requirement where based on switch case condition, we had to populate different word templates. Power automate A...