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 – https://www.cloudfronts.com/create-and-populate-word-template-using-power-automate/).
- Add Action Compose and store the populate Microsoft Word Template content in that.
- Now store the Compose Output in the variable of type Object.
Below is sample output of how your file content does not get corrupted when you move it from Compose Action to a Variable.