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 / Strategy for handling ...
Power Automate
Unanswered

Strategy for handling multiple JSON schemas

(0) ShareShare
ReportReport
Posted on by

Hello!

I'm a day and a half into this Flow at this point! Wow. Learning a LOT! Feel like I'm down to one final problem to solve (yeah right 🙂 ). Hoping someone can assist here.

Scenario:

  • Multiple Sharepoint lists (12) need to be migrated to flat files (for processing)
  • Some are > 5k items
  • Using the 'Send an HTTP request to Sharepoint' Action to query the lists
  • Parse the JSON response of each
  • Create a .json file of data on file system

Problem:

  • Because there are 12 lists, there are 12 JSON schemas to parse
  • I need a method for making the Parse JSON action dynamic so I can populate the schema based on the parsed list

Ideas for this one?

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    I don't think there is a way to make the schemas dynamic.  But you could use a Switch statement on some defining value to select which Parse Json action to use in your stream. 

  • Community Power Platform Member Profile Picture
    on at

    Thanks for the reply @Pstork1 . I appreciate you thinking about this. Feels like it would be VERY valuable to be able to add Dynamic Content to the Parse JSON action to accommodate this. 

    Example:

    • Send an HTTP request to Sharepoint List 1 (to obtain schema)
    • Parse JSON 1 and save output as a varSchema
    • Later in the Flow...
      • Send an HTTP request to Sharepoint List 1 with full query
      • Parse JSON 2 and pass varSchema
      • Create file/etc.

    No need for a Switch statement with 12 (or more!) options. 

    Or even more ideal, specify a URL where the schema is stored and have Flow fetch it.

    @Anonymous @RezaDorrani@ScottShearer , @yashag2255 ... thoughts on this one?

  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    I agree it would be useful, but it doesn't exist today and I don't think you will see it anytime soon.

  • Community Power Platform Member Profile Picture
    on at

    Well lets not get pessimistic! 🙂

  • RezaDorrani Profile Picture
    12,143 on at

    Hi @ericonline 

     

    Switch action for 12 defined parse json actions as suggested by @Pstork1 will work

     

    It can be made dynamic but would involve a lot of work with expressions

    For example - when you query the list and get the response

    You can run a for loop on the response results using expression:-

    body('action_name')?['d']?['results'] - This will point to the array response of items

     

    Next within the for loop to read each item,

    use expression item()?['columninternalname']

     

    To make columninternalname - dynamic - you would need to first query the column names and store them also in a collection

    so within the loop for the items array

     

    run another loop on the collection(array) of internal names and then use expression

    items('Main_loop_name')?[item()]  

    Main_loop_name - is the name of the main for loop (body('action_name')?['d']?['results'])

    item() - will give you the current column name from the columns array

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

     

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard