powerflows-requirement

Sateesh Krl 136 Reputation points
2021-04-27T14:28:43.45+00:00

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

Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
259 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
6,087 questions
No comments
{count} votes

Accepted answer
  1. Sateesh Krl 136 Reputation points
    2021-04-29T05:17:41.863+00:00

    Awesome!! Thanks for your help.


6 additional answers

Sort by: Most helpful
  1. Michael 17,861 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.

    91956-image.png

    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.


  2. 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.

    No comments

  3. Michael 17,861 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.

    91994-image.png

    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:

    91985-image.png


    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.


  4. 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 App1

    When 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.

    No comments