I'm hoping for some advice/comments/concerns from some folks more knowledgeable with the Power Platform than myself regarding a scenario I'm facing. I'm trying to transition an older dotnet application to the Power Platform and am running up against a stumbling block.
I am building a canvas app that lets users create a file package. A file package consists of multiple files selected by the user. Let's use a homeowners insurance policy as an example of a file package. A HO policy will consist of a main policy file but can also include several additional files depending on if the homeowner selects additional coverage. For example, not all HOs will add excess liability coverage but some will, or some HOs have expensive personal property (e.g., jewelry) they want extra coverage for. These cases will produce file packages with a different set of files: one main file and any combination of additional files depending on the home owner's coverage selections.
I would like to create a canvas app that creates the file package after a user makes their selections. A user selects which files to include and Power Automate creates the individual documents based on templates. The templates are populated with data entered in the app. In our HO Policy example, if a user adds extra coverage for personal property, they will select that template to add to the file package (file package now includes: main policy file and personal property file). That selected template will be populated with data captured in the app regarding the items and values of the personal property.
How do I implement this via a Power Automate flow triggered from my Canvas App?
I thought about creating one large flow: A user makes the selections and when finished clicks a button and the canvas app sends an array of selected templates to the flow. However, I don't see how this would work because the Populate MS Word Template step needs to know the specific template when creating the flow in order to map data to the template fields. If the template isn't defined until a user selects which ones they would like to add, the flow has no idea which template to use in the Populate MS Word Template step. I also don't see how to dynamically run a set of child flows based on an array of template names sent to the parent flow. For example, create individual flows for each template then have the array of selected templates define which child flows to run from a master parent flow. So, unless I'm missing something, this doesn't seem like the correct approach.
Another option: create a button (toggle, icon, etc) for each available template in the canvas app. When a user wishes to add that template to the file package they make the selection. OnSelect triggers an individual flow for each selection. This approach has promise but will require building a flow and corresponding button for each template. Not a huge deal but cumbersome. This appears to be the correct approach.
Anyway, thanks for reading. Any input/comments/concerns would be greatly appreciated. Thanks in advance.
Dan

Report
All responses (
Answers (