Im trying to make a cloud flow that splits a pdf based on its content. I have found up to this point that best way to do this is to Parse JSON to identify the text in the file, and then split it. However I am getting an error whenever it Parse's no matter the content I use, "The 'content' property of actions of type 'ParseJson' must be valid JSON. The provided value cannot be parsed: 'Unexpected character encountered while parsing value: e. Path '', line 0, position 0.'."
Any ideas to fix this problem or alternate ways to split the pdf without costly connectors would be greatly appreciated.
full flow with error code
Parse JSON and is source
The solution to this issue lies in the parse JSON content selection. Instead of selecting 'extracted content file', choose the body of the extracted pdf. this change solves this particular issue.
That is correct, I extracted it into a JSON format then pasted it directly, I have generated it before(from multiple sources) but that gives the same error code.
@Anonymous
Yea it happens sometimes. One more thing I am seeing is in schema you have directly pasted your data. Instead you should click on generate from sample and paste it there. Then power automate automatically will make your schema.
Am I correct you directly pasted in the schema rather than pasting it in generate from sample?
It usually is set to the content, however if usually reverts to body on its own for a reason I do not know. Nonetheless, when it is set to content, the error still remains
Hey @Anonymous
Instead of passing Body in the content action of extract pdf action, can you add the content you are getting from get file content action. I think that will do it for you.