web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Blank PDFs with Send a...
Power Automate
Answered

Blank PDFs with Send an email (V2) action

(1) ShareShare
ReportReport
Posted on by 4
Hello,
 
I use this PowerAutomate flow and I cannot figure it out why the PDF attachments that come with the email are white and blank. The file size is represented correctly but there is no content. I tried with Old Designer as well, still the same issue unfortunately.
 
Could you please help me? Compose action is there just do change the contents of the email body.
 
Categories:
I have the same question (0)
  • Suggested answer
    Assisted by AI
    RaghavMishra Profile Picture
    261 on at

    Hi! Blank PDF attachments in Power Automate emails are almost always a Base64 encoding issue. Here's how to diagnose and fix it.

    Root cause

    The Send an email (V2) action's Attachments Content field expects file content as a Base64-encoded string. If the content is passed incorrectly (e.g., raw binary without proper encoding), the resulting attachment will have the correct file size but will be blank/unreadable.

    How to fix it

    1. Use a Get file content action (SharePoint or OneDrive) to retrieve the file.
    2. In the Send an email (V2) attachments:
      • Name: the filename (e.g., file.pdf)
      • ContentBytes / Content: use the dynamic value File Content directly from the Get file content action — SharePoint already returns it in the correct format, so no additional encoding is needed.

    Common mistake to check

    If you're using a Compose action to manipulate the email body, make sure it only handles the email body text and NOT the file content. Passing binary content through a Compose action can corrupt the attachment encoding.

    Quick diagnostic

    Add a Compose action before the email step and set its input to @{body('Get_file_content')} — check the run output to confirm the content is not null or empty before it reaches the email action.

    References

    Found this helpful? Please mark ✅ "Does this answer your question?" so others searching for the same issue can find it quickly. A 👍 on "Was this reply helpful?" or a ♥ Like is also much appreciated!

    Raghav Mishra — LinkedIn | PowerAI Labs

  • Suggested answer
    Ellis Karim Profile Picture
    12,163 Super User 2026 Season 1 on at
     
    One method is to use a single append to array action:
     
     
    The recommended array format is the following below. In some cases when using Send an email V2 to send  attachments, the resulting files may be invalid or corrupt. In those cases, it is best to follow the below process as a workaround:
     
    #
     
     
    You should be able to copy and paste the following code:
    {
      "name": @{items('Apply_to_each')?['name']},
      "contentBytes": {
        "$content-type": @{items('Apply_to_each')?['contentType']},
        "$content": @{items('Apply_to_each')?['contentBytes']}
      }
    }
     
     
     
    Ellis Karim
    Ellis Karim
    elliskarim.com  |  LinkedIn  |  Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
  • Verified answer
    chiaraalina Profile Picture
    2,425 Super User 2026 Season 1 on at
     
    It's the Append to array variable step.
     
    Remove the "" and add base64ToBinary(outputs('Get_Attachment_(V2)')?['body/contentBytes']).
     
    Let me know if it worked!
  • Vish WR Profile Picture
    3,748 on at
     
    The email goes through with the correct file name and size, but the PDF content is completely blank or unreadable when opened.
     
    The Root Cause: This is almost always a Base64 encoding issue. The email action expects the file content to be a properly encoded Base64 string, and passing raw binary or forcing it through a conflicting Compose action corrupts it.
     
    The Fix: Use the Get file content action (from SharePoint or OneDrive) right before sending the email. In the email's attachment section, map the File Content dynamic value directly into the Attachment Content field. Power Automate natively formats this correctly, so you don't need any extra manual encoding functions.
     
     
  • SB-10060935-0 Profile Picture
    4 on at
    @chiaraalina thanks a lot for your help. 
     
    Your answer solved it. :)

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard