Use Approval Logs in the Generate Document action to include recorded decisions in a workflow document. Choose a text control for a compact summary or a repeating table for one row per approval record.
Map approval logs to a Word template
Add a text control or a repeating table to the Word template. For a table, prepare columns such as Approver, Decision, Approval time, and Comments. Upload the template to the document library used by the workflow. Create a Word template
In the workflow designer, place Generate Document after the steps whose decisions you want in the document. Open its Settings and select the template. Generate Document action
Open Set Variables, enable the text or table control in the mapping, and select Approval Logs as its source. For a text control, the records appear together as plain text.
For a table, map each column to a value from the approval record. For example, use the outcome for Decision and the comment for Comments. Choose the time value that corresponds to the approval event you want to record. Map workflow variables to a Word template
To display an attribute of the approver, open the column’s expression editor and add getUserAttr. Select Current object → Assignee as the user and choose an attribute from the picker, such as Job Title. The picker uses the user attributes configured in the Admin Center. Understand Expression Editor
Add approval rows to a contract summary
For a contract routed to a manager and then to legal, place the document action after both reviews on the approval path. In the Word table, map the workflow action, approver, decision, approval time, and comment to separate columns. Each completed review can then appear on its own row.
Set the output file name and choose the file variable for the generated document. Check who can open the generated file before using a template that includes approver details or internal comments.
Verify the generated document
Save and publish the workflow in a test application. Submit a fictional contract and use two test approvers. Have one add a comment and the other leave it blank.
Open the generated Word file and compare its rows with the history of that workflow instance. Check the row count, approvers, decisions, timestamps, and comments. For a text control, check the summary and its line wrapping.
If a row is missing, confirm the document action runs after the approval step you expect to include. If a column is blank, confirm its mapping. For a user attribute, check that the approver’s profile contains the selected value.
If more than one workflow path generates the file, test each path and compare the document with the approvals recorded when that action ran.

