Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to parse JSON output from Adobe Services Extract in Microsoft Power Automate

Explorer ,
Mar 23, 2022 Mar 23, 2022

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" in a Microsoft Power Automate Flow.  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.

Richtpt_0-1648055216967.pngexpand image

 

In the "elements" array the fields I need are all called "Text":

Richtpt_1-1648055233884.pngexpand image

 

Any suggestions how to get this data so I can put it into a database?  Thanks!

 

Here's my flow:

Richtpt_2-1648055256818.pngexpand image

 

And the run:

Richtpt_3-1648055275127.pngexpand image

 

 

 

 

TOPICS
PDF Services API , Power Automate
2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Mar 23, 2022 Mar 23, 2022

I have figured this out.

 

I have a Compose action to convert the Extract output - base64ToString(output).

A second Compose to convert that to JSON.

Then a select to get the 'elements' values I need.

Translate
Explorer ,
Mar 23, 2022 Mar 23, 2022

I have figured this out.

 

I have a Compose action to convert the Extract output - base64ToString(output).

A second Compose to convert that to JSON.

Then a select to get the 'elements' values I need.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 30, 2024 Oct 30, 2024

Long shot here...But would you be able to show your whole flow? I'm stuck where you were but not following your compose actions. I get expression not valid.

jeff_PCSHHS_0-1730292613084.pngexpand image

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 07, 2022 Apr 07, 2022

Glad here you found the solution. The other option is you can use Extract PDF Structure in a JSON Object, which will return in the body the JSON that you can then use a Parse JSON action to use in the rest of your flow.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 04, 2023 Apr 04, 2023

I have a similar flow - using the Extract to JSON (both object and tried with file) but when I inspected the contents of the JSON text, I do not see any values that were supplied to the fillable PDF. Searching for things known in the PDF (an amount field, name field, signature printed field) and nothing seems to be getting extracted. Any thoughts on why this is?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 31, 2024 Oct 31, 2024
LATEST

Same as of today. Elements returns null after parsing JSON using the Adobe extract schema.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources