I have built a PowerApp for a new Building Safety system - the app is working correctly and now I'm moving over to creating a Power Automate flow to grab the content from the App and add this into Word document template using the Word Online premium actions.
As we will have multiple Topics each with their own Claim text and multiple Subtopics (per topic), how would I leverage the flow so that it is able to put each Topic & Claim and their associated Subtopics, Subtopic Breakdowns, Argument and Evidence information into a format similar to the below? I'm not even sure if flow is capable of putting each Subtopic in a numbered format as shown in the screenshot - the MVP is that this data is inserted into the document template based on the screenshot (regardless of the numbering 6.1.1.1 etc).

This is a list of Topics - each of these have their own 'Argument' text field:

This is the Subtopic information:

So far, I have built the flow as below where I am starting with PowerApps as the trigger and then a 'Get item' action which
is getting the ID of the selected item from PowerApps.

Next I am getting information from the 'Buildings' list where I am using a filter query to match the Title field (building name) against the spBuilding value in the DocData SharePoint list.

Next I am getting information from the 'TopicsClaims' list where I am using a filter query to match the Building field (building name) against the spBuilding value in the DocData SharePoint list.

Next I am using an Apply to each to get the value from the above TopicsClaims list and then I am using a Get items action and then a filter to match the Topic field against the same field in the TopicsClaims list - this is how I link the subtopics to the topics in the PowerApp.

I am just not sure where to go next in terms of populating the word document as per the initial screenshots from the word template above and the explanation of how the data should look.
Any help with this would be much appreciated.
Thanks! 🙂