Skip to main content

Notifications

Power Automate - General Discussion
Answered

Being able to open documents sent for authorisation using teams authorisation.

(0) ShareShare
ReportReport
Posted on by 12

Hi, 

I'm relatively new to Power Automate and have spent the last day designing a flow that will automate an invoice approvals process. For some reason, when I add the file (pdf) that has been sent for query as an attachment, the authoriser cannot open it, getting the error message in acrobat Pdf viewer below:

 

Adobe Acrobat could not open '(FileName)' because it is either not a supported file type or because the file has been damaged (for example, if it was sent as an email attachment and wasn't correctly decoded).

 

I have attached screenshots of the flow I have built and the parameters of both the 'get content' action and the send for auth action.

 

I wish to point out that my organisation had one that worked previously however as our sharepoint site has evolved, it is now failing.

Also, I cannot use a link to the file instead as sharing is not allowed on our sharepoint site due to GDPR regulations.

 

Any help towards getting this to work would be greatly appreciated and if anyone needs anything else please let me know.

 

  • TomCarson-Mee Profile Picture
    TomCarson-Mee 12 on at
    Re: Being able to open documents sent for authorisation using teams authorisation.

    Hi @SamLed,

     

    Thanks for your response, I tried both versions within the JSON and I can now open the attachment in Adobe Acrobat (using the convert to binary option). However, it appears that the actual content of the file is not being pulled through as the PDF is just a blank page. If you have any idea how to fix this your advice would be greatly appreciated.

    edit: I got it to work, I had left the quotations around the content by accident.

     

    Thanks.

  • Verified answer
    SamLed Profile Picture
    SamLed 2,326 on at
    Re: Being able to open documents sent for authorisation using teams authorisation.

    Hi @TomCarson-Mee,

     

    Check out "Get file content from path" output, I'm pretty sure file content is Base64 encoded. Give a try replacing "File content" dynamic content by expression: base64ToString(outputs('Get_file_content_using_path')?['body']['$content']) in your Attachment item JSON.

     

    [Edit] As it is PDF, that may be base64ToBinary(outputs('Get_file_content_using_path')?['body']['$content'])

    ______________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard