Awesome!! Thanks for your help.
powerflows-requirement
I have a SharePoint Application List which has below columns.
Title Owner Application URL
App1 test1@xyz .com
Test2@xyz .com site URL
I need to send an email to these two email ids using flows. I am able to send email to one email id when i enable people picker multiple column for owner section I can not send it.
In ms flows send http request to SharePoint, I have provided this URI,
_api/web/lists/getbytitle('Applications')/items?$select=Owners/Title,ApplicationURL&$expand=Owners&$filter=Title eq '@{triggerOutputs()?['body/Application_x0020_Name/Value']}'
And in initializing variable i have take "varOwners" as string with value body('Send_an_HTTP_request_to_SharePoint')['d']['results'][0]['Owners']['Title']
But it is working for sing email id in Owners section but not working for multiple email ids.
Please suggest how to get that and send email to multiple owners.
Thanks
6 additional answers
Sort by: Most helpful
-
MichaelHan-MSFT 18,031 Reputation points
2021-04-28T04:20:39.257+00:00 Hi @Sateesh Krl ,
For multiple selections person column, when using api to get the value. It's not a single value, it has multiple values in it. As you can see the below.
So you need to initialize variable with this value:
body('Send_an_HTTP_request_to_SharePoint')['d']['results'][0]['Owners']['results']
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. -
Sateesh Krl 136 Reputation points
2021-04-28T05:20:06.277+00:00 I have added "Initialize variable for Owner Email" after "Initialize variable to get Owners". In that Name is "varOwnerEmail" and Type is "String" and Value is empty.
-
MichaelHan-MSFT 18,031 Reputation points
2021-04-28T05:50:54.97+00:00 Hi @Sateesh Krl ,
You could add a Parse JSON action, click Generate from sample. Copy the value of variable varOwners in the flow histroy, then paste it there as a sample and click done.
The schema should be like this:
{ "type": "array", "items": { "type": "object", "properties": { "__metadata": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string" } } }, "Title": { "type": "string" } }, "required": [ "__metadata", "Title" ] } }
Then append to string variable varOwnerEmail like this:
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. -
Sateesh Krl 136 Reputation points
2021-04-28T07:15:48.853+00:00 My scenario is, I have two lists, one list columns are:
LIst1--Title Owners Appurl
App1 xyz@test .com,xyz2@test2 .com TestURL
App2 Xxyz@test3.com----------------------------------------------------------
List2--
Title AppName(Lookup column of first list title)
Test App1When user filling a form in List2 and select App1 and email should trigger owners of App1. I have successfully completed sending email if one emailid present in Owners column but if i add another email I could not send.
Now I am getting error on "Search for users (V2)", Do i need to take loop before this again and if Yes what is that.