How To Populate Word Documents

This guide covers how to populate word documents via a Logic App or Power App integration.

1. Create a request (Logic App) or HTTP (Power App) trigger

This action will trigger the logic app to run and requires an API request to the logic app. This request should contain the JSON content to be added to the word doc.

2. Add “populate a Microsoft Word template” action

Choose the SharePoint site, folder and file to fill with the JSON content. This file should be the template with empty fields to fill.

Create a Word (.docx) template

· Use Content Controls (plain text controls/rich text controls) in Word. This is under the developer tab in Word.

· Give each control a title that matches a JSON field

Example:

{
"name": "John Smith",
"startDate": "2025-01-01",
"salary": "50000"
}

Word content control titles:

· name

· startDate

· salary

3. Add SharePoint create file action

This step creates a new file from the filled-out template and stores it in a SharePoint folder. The original template will be preserved and ready to re-use.

Last updated