Skip to main content

Notifications

Community site session details

Community site session details

Session Id : HRFUQ1ItLlZXcieBdJ82k7
Power Automate - Building Flows
Answered

parsing jason in Flow

Like (0) ShareShare
ReportReport
Posted on 17 Dec 2018 18:54:26 by 7

Hi:

 

Below is my JSON:

 

{
"people": [
{
"Name": "IT",
"email": "m@xxx.com"
},
{
"Name": "Finance",
"email": "g@yyy.com"
}
]
}

 

I have a start an approval process as my trigger and I need to send corresponding email when user selects IT or Fianace in sharepoint form, can someone please help. If a user selects IT on sharepoint form, I need to assign 'm@xxx.com' to 'assigned to' field

 

  • Mast-KBI Profile Picture
    7 on 20 Dec 2018 at 19:21:09
    Re: parsing jason in Flow

    The solution helped me, even though JSON parsing is giving me error and I was able to circuvent the issue. Thanks again!

  • Mast-KBI Profile Picture
    7 on 18 Dec 2018 at 17:11:21
    Re: parsing jason in Flow

    I am not sure how to paste the screen shot, I am getting below error:

     

    InvalidJSON: The content property of actions of type 'ParseJson' must be valid JSON. The provided value 'Parse_JSON' cannot be parsed: 'Unexpected chracter encountered while parsing value: P.path", line 0, position 0.'.

     

    Content

     

    Parse_JSON

     

    Schema:

    {
    "people": [
    {
    "Name": "IT",
    "email": "mvvv@nn.com"
    },
    {
    "Name": "Finance",
    "email": "mnn@nn.com"
    }
    ]
    }

     

    I have manually entered the schema to make sure there are no while spaces and while I saved, gave me no error but getting error while running the flow, appreciate your help

  • Verified answer
    v-yamao-msft Profile Picture
    on 18 Dec 2018 at 07:54:37
    Re: parsing jason in Flow

    Hi @Mast-KBI,

     

    Please consider adding Parse JSON action in your flow. Please check the following doc for a reference:

    https://flow.microsoft.com/en-us/blog/five-services-json-http/

    I have made the following test for my scenario.

    Trigger the flow with a manual button, add two options IT and Finance.

    Add action Parse JSON, input the following JSON.

    {
    "people": [
    {
    "Name": "IT",
    "email": "test4@xxxx.onmicrosoft.com"
    },
    {
    "Name": "Finance",
    "email": "mabel@xxxx.onmicrosoft.com"
    }
    ]
    }

    Add Compose action and rename it to IT with the following code:

    body('Parse_JSON')['people'][0]['Name']

     Add Compose action and rename it to ITEmail with this code to return the email address of name IT:

    body('Parse_JSON')['people'][0]['email']

     The similar configuration with Finance and the corresponding email address.

     

    body('Parse_JSON')['people'][1]['Name']
    
    body('Parse_JSON')['people'][1]['email']

     

     Add the action send an email, input the following code to send email to IT or Finance based on the selection from the trigger:

    if(equals(triggerBody()['text'],'IT'),outputs('ITEmail'),if(equals(triggerBody()['text'],'Finance'),outputs('FinanceEmail'),''))

     A screenshot for your reference:

    1.PNG 

     

    Best regards,

    Mabel

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 123

#2
David_MA Profile Picture

David_MA 104 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 90 Super User 2025 Season 1

Overall leaderboard
Loading started