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 / Read attachment conten...
Power Automate
Unanswered

Read attachment content (pdf format) for incoming emails

(0) ShareShare
ReportReport
Posted on by 17

Hi,

 

When an Outlook.com email arrives I would like to save the pdf attachment into specific OneDrive folder.

 

The problem is that I have more emails of the same topic, body, from and attachment name. I can only differentiate one from another by reading pdf attachment content.

 

Can this be automated by PA in 2023?

 

Did some tests but PA in my case in unable to get attachment content - it's encoded probably.

2023-04-20_12-48-43.png

2023-04-20_12-51-43.png

 

I found a way to make it work with base64ToString function on txt attachments (not my case/file format though).

Categories:
I have the same question (0)
  • Rayearth Profile Picture
    17 on at

    Hi @AlexEncodian, thanks for the suggestion.

     

    Tried to set it up for a single case where my pdf attachment contains just the "pit tax" string, but I get an error saying:

    The API 'encodiandocumentmanager' returned an invalid response for workflow operation 'Get_PDF_Text_Layer' of type 'OpenApiConnection'. Error details: 'The API operation 'GetPdfTextLayer' requires the property 'body/TextLayer' to be of type 'String' but is of type 'Null'.'

    Any ideas where this is coming from?

     

    Flow setup:

    2023-05-07_21-08-16.jpg

     

    Flow test result:

    2023-05-07_21-15-24.jpg

  • Rayearth Profile Picture
    17 on at

    My PDF attachments have selectable text inside so I assume the "flatness" is not my case in fact.

     

    I managed to build a flow that works for me, but to be honest I don't really understand why this has to be so over complicated with the additional steps (getting email, creating a temp file in temp folder, getting file's content, moving recognized file to destination and renaming it to target filename).

     

    Appreciate if somebody can explain briefly why PA/Encodian cannot read PDF's content "on the fly" ie. without saving the attachment to OneDrive or SharePoint and directly from the email. The actions' parameter options are there...

     

    2023-05-14_22-02-39.jpg

  • Rayearth Profile Picture
    17 on at

    Thanks @AlexEncodian for the investigation and suggestions.

     

    I managed to make my flow a little bit leaner using just one additional step (Get attachment action) and then  Encodian's file content upon saving to OneDrive. Same, expected result as before. This suits me better 😊

    2023-05-15_22-09-21.jpg

  • Rayearth Profile Picture
    17 on at

    I'm confused.

     
    Both this and this flow which originally gave no errors but now stopped working for me and the same error msg appeared for both on the Get PDF Text Layer step.

    The API 'encodiandocumentmanager' returned an invalid response for workflow operation 'Get_PDF_Text_Layer' of type 'OpenApiConnection'. Error details: 'The API operation 'GetPdfTextLayer' requires the property 'body/TextLayer' to be of type 'String' but is of type 'Null'.'
    Hello again @AlexEncodian. Um... has anything changed on Encodian side?
  • AlexEncodian Profile Picture
    4,409 Moderator on at

    @Rayearth 

     

    Hi Ray, please get in touch with support on our website.  They’ll ask you for the inputs and tell you why the error message is occurring. Did the PDF files definitely have text layers?

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard