To successfully implement this DPA in practice, it requires to make a generic automated process that essentially stacks entity records against related entity field.
This article is prepared for users familiar with Power Automate fundamentals and concepts.
Focus is more on the process steps of managing data and description of actions of Built-in connectors like Data Operations, Variable and Expressions functions.
Your initial email/notification body result might look like this:
You can also customize the style of table like this:
We will go through all steps shown below.
1. When creating a new cloud flow pick a scheduled cloud flow and configure it.
2. Insert a new step, add an action - Premium Microsoft Dataverse “List rows” and configure it. Example:
3. Insert a new step, add an action – Build-in Variable “Initialize variable”. Configuration:
4. This step is optional (not mandatory) but can be required depending on a case. (Skip to step 5).
Insert a new step, add an action – Build-in Control “Condition”.
Reason: to support several scenarios where (If yes) at least one record or (if no) none listed after query to set up different groups of actions.
Configuration:
The equivalent of Condition Expression function in Dynamics 365 is: operator “Contains Data”
or
5. Insert a new step, add an action – Build-in Control “Apply to each”.
Configuration:
Reason: to identify all records and related owning user primary email addresses.
Select “Name” from “Initialize variable” previous action.
6. Add an action – Build-in Data Operation “Compose” outside “Apply to each”.
Configuration:
Reason: to create a list of unique email addresses in ascending order.
7. Add an action – Build-in Variable “Set variable”.
Reason: to set all listed unique email addresses in ascending order as custom variables.
Configuration:
Select “Name” from “Append to array variable” previous action.
8. Insert a new step, add an action – Build-in Control “Apply to each”. By default “Apply to each 2” will be added.
Configuration:
Reason: to prepare a set of actions for each custom variable.
9. Insert a new step, add an action – Build-in Data Operation “Filter array” inside (a new) “Apply to each 2”.
Configuration:
Reason: to stacks or group all previously listed entity records against related entity field (custom variable).
10. Insert a new step, add an action – Build-in Data Operation “Select” inside (a new) “Apply to each 2”.
Configuration:
Reason: to prepare table data.
11. Insert a new step, add an action – Build-in Data Operation “Create HTML table” inside (a new) “Apply to each 2”.
Configuration:
Reason: to create standard HTML table data.
12. This step is optional (not mandatory) but can be required depending previous step.
Insert a new step, add an action – Build-in Data Operation “Compose” inside (a new) “Apply to each 2”.
Configuration:
Reason: to prevent errors in a later stage when Email body with URL is generated.
13. Insert a new step, add an action – Build-in Data Operation “Compose” inside (a new) “Apply to each 2”.
Configuration:
concat(body('Filter_array')?[0]?['owninguser']?['firstname'], ' ', body('Filter_array')?[0]?['owninguser']?['lastname'])
14. Insert a new step, add an action – Build-in Data Operation “Compose” inside (a new) “Apply to each 2”.
Configuration:
15. This step is optional (not mandatory) but can be required depending on a case. Insert a new step, add an action - Premium Microsoft Dataverse “Add a new row” and configure it.
16. This step is optional (not mandatory) but can be required depending previous step nr.15. Insert a new step, add an action - Premium Microsoft Dataverse “Perform a bound action” and configure it.
Example:
Try it out and compare if results are similar to provided examples at the beggining of the article. Good luck! 😊