Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

SharePoint List item attachment PDF file not opening in a Teams Approval message

(0) ShareShare
ReportReport
Posted on by 716

Hello Power Automate community. 

Can you help please?
The issue I have is: when I send an Approval message via Microsoft Teams and add a PDF file, from the attachments in a SharePoint List item, the approver is unable to open the PDF file and receives a message in Adobe Acrobat Reader stating:

 

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

 

The real issue appears to be creating the file, as even if I try to open the file attached to the SharePoint List item, it gives me the same error.

 

Here's some more information to help. 

 

The URL I provide in the Approval message is structured like this:

https://mycompany.sharepoint.com/sites/MySiteName/Lists/MyListName/Attachments/69ThisMustBeTheIdOfTheFileInTheAttachmentsFolder/MyFileName.pdf

 

The process is as follows:

  1. A Microsoft Form is completed.
  2. Flow 1 triggers and creates an item in a SharePoint List and populates the answers from the Microsoft Form into columns in the SharePoint List item.
  3.  It gets the data from the List item.
  4. It converts the data into a html table.
  5. It uses the OneDrive for Business connector to create a file.
  6. It converts the file to a PDF.
  7. It recreates the file.
  8. It adds the file to the attachments column of the SharePoint List item.

Below are the actions of the Flow not expanded.

GarryPope_2-1712993208465.png

 

Below are the actions expanded.

GarryPope_4-1712993881369.png

 

GarryPope_7-1712994682270.png

 

Now, even before my second Flow runs and gets the attachment and send it for an approval, the file attached to the SharePoint List item doesn't open when I click on it, and it gives me the error I mentioned at the top of the post. 

 

GarryPope_3-1712993466294.png

 

GarryPope_6-1712994189182.png

 

Any idea what I'm doing wrong, please?

Thanks in advance for all your help,

Garry

  • CU01081947-0 Profile Picture
    716 on at
    Re: SharePoint List item attachment PDF file not opening in a Teams Approval message

    Hello @ManishSolanki,

    Thanks for the tip. Your idea made me think I must be doing something wrong, so I created a whole new Flow and tested each action step-by-step. Even though I created exactly the same Flow, my new Flow worked perfectly, and didn't need the action you recommended. Clearly, I must have done something incorrect in my original Flow, but I can't see what, haha! Either way, my new Flow is working perfectly now. 

    I'd like to thank you for all your help and great ideas, I really appreciate it. 

    All the best,

    Garry 

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: SharePoint List item attachment PDF file not opening in a Teams Approval message

    Hi @GarryPope 

     

    Pls verify if html file and pdf files are being created in the onedrive. Try accessing those directly from onedrive.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

     

  • CU01081947-0 Profile Picture
    716 on at
    Re: SharePoint List item attachment PDF file not opening in a Teams Approval message

    Hello @ManishSolanki,

    Thanks so much for your help, especially on a weekend!

    So the error I was having no longer appears, that's great. Thanks!

    But when I open the PDF file, it's blank. My content is not in the file.

    Any ideas where the content is being lost, please? 

    Thanks very much,

    Garry

  • ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on at
    Re: SharePoint List item attachment PDF file not opening in a Teams Approval message

    Hi @GarryPope 

     

    You need to add "Get file content" action between create file & add attachment to get the content of file. Pass the ID from create file action as shown below:

    ManishSolanki_0-1713003935002.png

     

    In "Add attachment" action pass the content from the previous action as shown below:

    ManishSolanki_1-1713004034325.png

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492