web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Parse JSON output into a usable string

(0) ShareShare
ReportReport
Posted on by 26

Hi,

My objective is to retreive and display two fields (webLink and toRecipient:name) from a emails in a shared mailbox to be used in an HTML table. How do I get the value of toRecipients:name - just the name?

 

Thanks,

 

Terry

 

Right now this is what I get:

 

"to": [
{
"emailAddress": {
"name": "XXXXXXXXX",
"address": "XXX@XXX.com"
}
}

I'm using the graph to retreive the values and this is the schema:

{
 "type": "object",
 "properties": {
 "@@odata.context": {
 "type": "string"
 },
 "@@odata.nextLink": {
 "type": "string"
 },
 "value": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "@@odata.etag": {
 "type": "string"
 },
 "id": {
 "type": "string"
 },
 "webLink": {
 "type": "string"
 },
 "toRecipients": {
 "type": "array",
 "items": {
 "type": "object",
 "properties": {
 "emailAddress": {
 "type": "object",
 "properties": {
 "name": {
 "type": "string"
 },
 "address": {
 "type": "string"
 }
 }
 }
 },
 "required": [
 "emailAddress"
 ]
 }
 }
 }
 }
 }
 }
}

graph.png.jpgselect.jpg

 

I have the same question (0)
  • v-yamao-msft Profile Picture
    on at
    Re: Parse JSON output into a usable string

    Hi @Terry_McCullagh,

     

    You may take the following blog USING JSON IN MICROSOFT FLOW for a reference:

    https://sergeluca.wordpress.com/2017/11/23/using-json-in-microsoft-flow-part-1/

    I assume that you could configure the code to something like:

    Item()?['toRecipients']?['name']

     Hope it could be your reference.

     

    Best regards,

    Mabel

     

  • TerryMcCullagh Profile Picture
    26 on at
    Re: Parse JSON output into a usable string

    Mabel, Thank you for the suggestion.

     

    I tried Item()?['toRecipients']?['name'] and received this error:

    ExpressionEvaluationFailed. The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@Item()?['toRecipients']?['name']' is of type 'Null'. The result must be a valid array.

    Can you identify what I'm doing wrong?

     


    Annotation 2019-01-29 105517.jpg

    Thanks,

    Terry

  • DanielaHo Profile Picture
    241 on at
    Re: Parse JSON output into a usable string

    Hello, 

    I know it's been a while since this post but I'm having the same problem. The JSON is an object and I'm trying to extract data from it, and nothing works.. curious if you or anyone has a solution. Most solutions found online are extracting from a JSON array not object.

  • ESG Profile Picture
    14 on at
    Re: Parse JSON output into a usable string

    When you parse the JSON, do you do it immediately after having access to it, or are you trying to parse JSON while nested inside of something that may not really have access to the JSON data?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 647 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 350 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard