How to Insert a Loop-
Step 1- Prepare a Record Collection Resource
To insert a loop, first create a Record Collection Resource that defines the collection of records over which the loop will be performed. Example: If your base object is Account and you want to loop through related Opportunities , create a Record Collection Resource that retrieves all Opportunities where:
- Account Id = Record.Id (i.e., the current Account record's Id).

Step 2- Insert the Loop in the Template
- Use the Select Action dropdown and choose Insert Loop .
- In the Resource Type dropdown, select the Record Collection Resource you just created.

Step 3- Customize the Loop Content
- The inserted loop will appear in the template with a placeholder section labeled "Click or tap here to enter text.β

- Click the placeholder to select it, erase the placeholder text, and begin creating the content for the loop using fields from the selected Record Collection. Use the Insert Field action to add fields dynamically within the loop.
Example:
In the image below, the loop iterates over related Opportunities. Inside the loop, two fields β Name and Opportunity Id β have been inserted as dynamic text.

Preview the Generated Document
When the document is generated, the loop content will repeat for each record in the collection. Each iteration will populate the fields with data from a single record in the collection. Example Output: For an Account with two related Opportunities, the content inside the loop will repeat twice, once for each Opportunity. Generated Document Sample:

Go to 4:36 to see the Insert Field action being used to create a sample receipt in Microsoft Word.