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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to pass the JSON P...
Power Automate
Unanswered

How to pass the JSON Payload Schema dynamically

(0) ShareShare
ReportReport
Posted on by 30

Im getting a Json like this:

 

 

[
 [
 {
 "TimeGenerated": "2021-05-18T20:36:11.916Z"
 },
 {
 "DestinationIP": "9.9.9.9"
 },
 {
 "DestinationUserName": "abc"
 },
 {
 "country_name": "Panama"
 },
 {
 "country_iso_code": "PA"
 },
 {
 "AccountCustomEntity": "xyz"
 }
 ],
 [
 {
 "TimeGenerated": "2021-05-18T20:36:11.916Z"
 },
 {
 "DestinationIP": "9.9.9.9"
 },
 {
 "DestinationUserName": "abc"
 },
 {
 "country_name": "Panama"
 },
 {
 "country_iso_code": "PA"
 },
 {
 "AccountCustomEntity": "xyz"
 }
 ]
]

 

But not ever im gonna get that style of json,

somethimes im gonna get a json like this:

 

 

[
 [
 {
 "ABC": "2021-05-18T20:36:11.916Z"
 },
 {
 "BCD": "9.9.9.9"
 },
 {
 "ZXC": "abc"
 }
 ],
[
 {
 "ABC": "2021-05-18T20:36:11.916Z"
 },
 {
 "BCD": "9.9.9.9"
 },
 {
 "ZXC": "abc"
 }
 ]
]

 

With different Key and Value

 

So, i need to pass this Json to PowerApps to make a collection but to do this, first i need to pass with a RESPONSE

madmvx_0-1621373132590.png

But the RESPONSE needs a sample schema, the problem is, the schema NEVER gonna be the same

and i can not pass the sample stored in a variable to the option "generate from sample"

like:

madmvx_1-1621373217824.png

 

Exist a way to parse a json to pass a powerapps that never gonna be the same?

 

 

 

 

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @madmvx 

     

    You can't dynamically generate a JSON Schema. The whole idea for Parse JSON schema is validate the data in a specified manner so that in next step you can access the expected data attributes. 

     

    Can't you pass the JSON output under the Body. My understanding is Response Body JSON Schema is optional where if you want to validate before it returns.

     

    Thanks

  • madmvx Profile Picture
    30 on at

    If i dont pass the schema, in power apps, i can't use the data as collection

    How can i solve that?

  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @madmvx 

     

    Unfortunately this is not possible. Like I mentioned earlier the whole idea of schema validation is make sure the data is coming in right format. If you know all the format of your JSON format why not generate one schema which might work for you.

     

    Thanks

  • ravisonawane4 Profile Picture
    4 on at

    Hi @madmvx 

    try this schema

     

    {
     "type": "object",
     "properties": {
     "[index]": {
     "type": "string"
     }
     }
    }

     

  • CU20011233-0 Profile Picture
    54 on at

    I'm having the same issue. Did you find a resolution to that?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard