Showing results for 
Search instead for 
Did you mean: 
Helper V
Helper V

Flow cannot parse JSON directly from file content

I do have this working, but I'm not sure what the problem was. I'm hoping someone out there can educate me. 🙂

Part of my flow goes out to SharePoint, and gets the content of a specific file in a shared library. If I connect the Parse JSON action directly to the output of the Get file content action, the flow throws the error below.

Screenshot 2020-12-17 at 14.27.05.png

 However, when I initialise a string variable, dump the file content into the variable, and then parse that value from the variable, everything works fine.

Screenshot 2020-12-17 at 14.23.37.jpg

 Can someone tell me what's going on here? Why will the Parse JSON action play nice when pulling from a variable, but not from the action that feeds the variable? The file accessed in SharePoint is a .json file, and is properly formed, since the Parse JSON action doesn't complain about the content when in a string variable.

Advocate I
Advocate I

I have no idea but I wouldn't be surprised it's a bug because I am currently adding a Parse Json component to my flow and it does not let me specify the schema anymore. In other words, when I click in the Schema edit window, nothing happens:  I don't get a cursor and I can't paste anything. Even clicking the button Generate From Sample does nothing: just displays an empty dialog into which you can drag&drop or paste nothing, totally inactive.


So I gotta ask you:  how did you manage to enter your schema in the Schema pane?

Hey, @iso !

I actually manually typed the JSON schema into the action pane. I designed the JSON layout of the file in-question, so I already knew what the schema looked like. It let me type it into the pane directly without problem. Just to test your previous message, I just now tried to generate a schema by dropping the JSON file content into the Generate From Sample pane, and again, it let me enter it just fine (and, thankfully, created the same schema I had previously entered manually).

My only idea about what might be causing your issue is that you are blocking some of the cookies required to run the Power Automate site. Microsoft requires a stupid number of cookies from a ludicrous number of domains to properly run various Office 365 sites (Power Automate, PowerApps, and SharePoint are among the worst). Here's the whitelist I compiled specifically for these three O365 apps...

  • https://[*.]
  • https://[*.]
  • https://[*.]
  • https://[*.]
  • https://[*.]
  • https://[*.]
  • https://[*.]
  • https://[*.]
  • https://[*.]
  • https://[*.]
  • https://[*.]

Sidenote: This message is a perfect example of the objectively poor quality of Microsoft products. Every one of those bullet points changed itself into a hyperlink, without my permission or instruction, and the only way to remove the hyperlinks was to directly edit the HTML of this message. (facepalm) I'm not an Apple fan just bashing Microsoft, either. Apple, Google, and Microsoft all produce products of truly awful quality. This is what happens when a business becomes so big that it no longer has to care about customer experience.

Thanks @AIUYM19 but the problem was that in the Parse JSON widget, where the first line in the Schema pane is, you usually have a text field where you can start entering the schema manually. In this case, there was no such text field visible, only a completely blank Schema pane. And then, a coulpe hours later after a couple of refreshes, there it was again!  I suspect some greenhorn MS engineer was tweaking the Automate code and by mistake introduced the bug. 

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,249)