We are wanting to parse a PDF email attachment, extracting specific text and putting it into a SQL Server database.
I'm using Adobe Services "Extract PDF Structure in JSON File". The output is outputs('Extract_PDF_Structure_in_a_JSON_File')?['body/jsonFileContent'], which is unreadable. How do I convert that to something I can work with?
Also, I was able to output that to a JSON file. I don't know much about JSON. When I open the file in Notepad++ I see there are four sections, "pages", "extended_metadata", "elements", and "version". I only need the data in the "elements" section, and that section is a JSON array.
In the "elements" array the fields I need are all called "Text":
Any suggestions how to get this data so I can put it into a database? Thanks!
Here's my flow:
And the run:
Solved! Go to Solution.
Figured it out!! I have a compose that does base64ToString, a compose that converts that to JSON, then a select that pulls out the value I need.
Here's the flow:
First Compose: base64ToString(outputs('Extract_PDF_Structure_in_a_JSON_File')?['body/jsonFileContent'])
Now I've got data I can insert into SQL Server! Thanks very much for the base64 tip!
Hi @RichardUchytil ,
Try base64
https://debajmecrm.com/binary-to-base64-in-microsoft-power-automate-microsoft-flow/
Great! That changes it into readable text!
But now how do I tell my flow to only use the array in the "elements" section?
Figured it out!! I have a compose that does base64ToString, a compose that converts that to JSON, then a select that pulls out the value I need.
Here's the flow:
First Compose: base64ToString(outputs('Extract_PDF_Structure_in_a_JSON_File')?['body/jsonFileContent'])
Now I've got data I can insert into SQL Server! Thanks very much for the base64 tip!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
28 | |
26 | |
23 | |
17 | |
10 |
User | Count |
---|---|
61 | |
54 | |
29 | |
27 | |
24 |