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 / PDF Blank and XML Atta...
Power Automate
Unanswered

PDF Blank and XML Attachment when Send email with attachments from other email

(1) ShareShare
ReportReport
Posted on by 16

Hi, 

I have a flow that, when an email arrives, extracts the attachments, which are a PDF and XML. I put them in an array with the following structure:

{
"Name": "@{items('Apply_to_each')?['name']}",
"ContentBytes": "@{items('Apply_to_each')?['contentBytes']}"
}

Everything is correct with the flow; the problem is that when the email with the attachments arrives, the XML opens correctly, but the PDF is blank. I have already tried removing the quotation marks from ContentBytes, also with the 'get attachments' connector, but the result is the same. The XML is fine, but the PDF appears blank.

vulturus195_0-1701373331329.pngvulturus195_1-1701373355243.pngvulturus195_2-1701373388299.png

 

Categories:
I have the same question (0)
  • RobotRising Profile Picture
    402 on at

    can you post a screenshot of the email action in the flow expanded with all advanced options showing?

     



    --------------------------------------------------------------------
    🌟 If I have helped give me a thumbs up! 👍
    If I have answered your question, please mark it as solved ✅

  • vulturus195 Profile Picture
    16 on at

    Hi, 

    Also when i check the run of the "send email" the pdf has the content but i got in blank 

    vulturus195_0-1701447575666.pngvulturus195_1-1701447750177.png

    vulturus195_2-1701447775598.png

     

  • Arne-H Profile Picture
    26 on at

    Hello,

    I'm experiencing the same issue. I've attempted to extract each PDF from the email and send it to a specific email address. While the email is sent successfully with the PDF attachment, the content of the PDF appears to be blank.

     

    Did you find any solutions yet?

  • Arne-H Profile Picture
    26 on at

    Hello,

    After some exploration, I found a solution. It seems that when you add the attachment in the sent mail, it encloses the content bytes in quotes for some reason. Deleting those quotes should resolve the issue."

    It should be like the example.

    ArneH_0-1701872363635.png

     

  • rtufino Profile Picture
    7 on at

    It works!

     

    Thank you

  • Speekins Profile Picture
    18 on at

    You saved me a ton of time and headache trying to solve this. Thank you!

  • mjfernandes Profile Picture
    16 on at

    Hello,

    I´m still getting Blank pdf. When I open the file created in sharepoint it's OK. But when send by email get a blank pdf from the attachment. Can you help me on that?Screenshot 2024-03-04 at 10.45.11.png

  • vulturus195 Profile Picture
    16 on at

    Hi,

    I also tried everything to send the attachments from email but it didn't work so what i did is the following:
    1. From the attachments in the email i create a file, extract the file, append to array and when i get the content from SharePoint file, delete the file.

    With this i get the attachments from email and send email perfectly, this for loop run between 7s to 9s, so for me it's ok

    vulturus195_1-1709568559632.png

    Just to clarify my flow is:

    When an email arrived -  This where i get the attachments
    extract attachments and info - This is where the for loop comes in
    Send attachments via email 


     

  • rtufino Profile Picture
    7 on at

    Hi.

    I am using in different flow with "Find file from OneDrive block. But the principal block is ¨Get file content¨. This block get the bytes of file to be attached to the variable.

     

    rtufino_0-1709569857334.png

     

    Perhaps you need review the name of field ¨ContentBytes¨

  • vulturus195 Profile Picture
    16 on at

    You must put first the name then ContentBytes

    vulturus195_0-1709571497864.png

     

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard