Introduction
Today, I have come across an interesting scenario when sending emails to multiple users in the People Picker field. For the approval scenario, I have an ‘Approvers’ list and the value can be more than one in some scenarios. It is required to send approvals to all the users in the People Picker field. Below is the screen capture for reference.

The functionality can be achieved by Power Automate. This is a little trickier, let's see this in action.
Steps
Step 1. Login to Power Automate (https://flow.microsoft.com) using your organization credentials.
Step 2. From the home page, click on new flow and select ‘Instant cloud flow’

Step 3. Get items from the SharePoint list. In this scenario, I have configured the ‘Approvers’ list to store the approvers by country.

For getting country-specific, I have used the following OData query.
(Title eq 'Legal')
and
(Country eq 'Brazil')
Step 4. Initialize array variable ‘varApprovers’.

Step 5. Add the ‘Compose’ action and select the ‘value’ from the ‘Get Items’ action.

Step 6. Now it's time to run the flow manually to get the JSON schema from the ‘compose’ action. This is needed for the ‘Parse JSON’ action.
Copy the JSON Output. You should be getting similar data as shown in screen capture.
Step 7. Add the ‘Parse JSON’ action from the ‘Compose’ series and in the content field add the ‘Value’ from the getting items section.

Now click on ‘Generate from sample’ and copy the JSON schema that you have copied at step 7 and click ‘Ok.
Step 8. In this scenario, I need to have these 2 values that appear in emails in the ‘Approver Array’ to the variable array that is initialized in Step 3.










Join the conversation! Your thoughts help the community grow.