cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jhenry
Level: Powered On

Json Parse Schema

I am trying to parse data from my API into Flow, however i cannot figure out how to parse a list of objects. I want the end result be that for each item in the list, i can send an email about it.

 

Data given by API:

 

{
  "item1" : {
    "category" : "1",
    "name" : "my name",
    "data" : "my data"
  },
  "item2" : {
    "category" : "2",
    "name" : "my name",
    "data" : "my data"
  }.........
}

 

payload given by JSON parser:

 

{
  "type": "object",
  "properties": {
    "item1": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "data": {
          "type": "string"
        }
      }
    },
    "item2": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "data": {
          "type": "string"
        }
      }
    }
  }
}

how to i set the parser to understand there may be diffrent items in the list?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Json Parse Schema

Hi @jhenry,

 

Take a look at the parse JSON Action:

Parse JSON messages

Then you should be able to manage the items returned by the Parse JSON Action.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Json Parse Schema

Hi @jhenry

 

What you need to do after parse? i really recommend you to use the expression json() to parse your text in this case.

 

If you can explain a little more for us your case will be great.

 

Hope have helped,

 

Gustavo Moraes


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


jhenry
Level: Powered On

Re: Json Parse Schema

hi @gamoraes,

 

For each Item (item1,item2,item3.....) i want to get its name and email it someone. I will use the json() to parse the body to json, but i still need to parse the data correctly since it is not a finite amount of information.

Community Support Team
Community Support Team

Re: Json Parse Schema

Hi @jhenry,

 

Take a look at the parse JSON Action:

Parse JSON messages

Then you should be able to manage the items returned by the Parse JSON Action.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,655)