You need to use a Get Items action in your flow. Based on the results from your Form, you can filter out the values returned from the Get Items action.
Since you have multiple values you are comparing to, you can't use the Filter Query in the Get Items action. Instead, you'll need to use the Filter Array action.
Compose String of Users
Add a Compose action with an expression. You'll need to use the json() function. Insert the outputs from the form that contain the user selection.
json([insert users selection dynamic content here])
The output of that Compose action will be an array of selected users. You'll need to use add a Join action to convert the array to to a string separated by a coma (or any separator). In the From field, insert the outputs from the Compose action above. In the Join with field, input your separator and a space.

Run a test. Check to see the outputs before moving onto your next step.
Get Your SP List of Users
Add a Get Items action to retrieve the list of users. As mentioned above, you can't use the Filter Query because you are checking against multiple values.
Instead, use a Filter Array action. In the From field, insert the value dynamic content from the Get Items action.
In the first value, insert the outputs from the Join - Selected Users action. Change the condition to contains, and in the second value field insert the Title dynamic content from the Get Items action.
This action will essentially check your string of users against each Title in your SharePoint list.


Run a test. If done correctly, your Filter Array action should have some outputs.
Compose Email Addresses & Email
The Filter Array action will return an array of values from your SharePoint list. You need to extract the email addresses and compose them into a string of email addresses separated by a semi-colon.
Add a Select action. In the From field, insert the Body output from the Filter Array action. In the Map, click on the icon to the right to change to text mode.
You'll need an expression. You can reference the outputs from the Filter Array action to see where the 'Profile' and 'Email' in the expression came from.
item()?['Profile']['Email']
Add a Join action to convert your array of email addresses into a string separated by a semi-colon. Important: If you need to send a separate email address to each user, then you can omit the Join function and instead use an Apply to Each action to loop through each email address and run a Send an Email (V2) action in the apply to each loop.

Hope this helps!
If I helped you solve your problem—please mark my post as a solution ✅. Consider giving me a 👍 if you liked my response!
|