Create and Populate Word Template Using Power Automate

 Introduction: We are aware of dynamics 365 CRM's Document template functionality. However document templates do not need XML Mapping which limit the fields that we can populate in template. SO here's a way to use Power Automate and SharePoint and implement the Document template functionality.

 

Steps:

  1. Create Word Template with content controls and Upload to SharePoint.

  • Enable the Developer tab and click on Design Mode.

  • From the available controls add the Content controls, repeating controls(For data table).

  • Click on properties and add title, tag.

  • Once done save the word and upload to SharePoint.

 

Graphical user interface, application

Description automatically generated

 

  1. In you Power Automate (You can trigger the power automate as per your requirements).

  • Action1: Get File Content.

Site Address: your SharePoint link

File Identifier: Your uploaded document template.

 

  • Action2:Popualte a Microsoft Word Template.

Location: SharePoint Location.

Document Library: Share Point Site Contents.

File: Your uploaded document template.

Content control: the content controls from your template will be visible here.

Graphical user interface, application

Description automatically generated

  • Action3: Create file.

File Name: Should end with .docx

File Content: will be the populated word template.

Graphical user interface, application

Description automatically generated

 

Conclusion: Thus when your power automate runs, a Document will be created in SharePoint from the document template. It is easy to populate a Content control, to know about how to populate a repeating control- check next blog


Comments

Popular posts from this blog

The supplied reference link is invalid Error in Cloudflows

Set Dynamic Recipients of D365 Email in Power Automate

Retrieve Email Recipients (TO, CC, BCC) in Cloud Flow