Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Suggested answer

Attachments are corrupted in Outlook

(0) ShareShare
ReportReport
Posted on by
Hi,
 
I have a Power Automate flow that triggers when a new email arrives from customer. The next action is to send an email to a PIC, where its content must include the attachments sent by customer.
 
Here are the flow processes:
1) Initialize array variable "colAttachments"
2) Filter array to include only relevant attachments:
3) Apply to each Filter Array output:
 
 
json(concat('{ 
  "Name": "', items('Apply_to_each')?['name'], '", 
  "ContentBytes": "', outputs('Get_Attachment_(V2)')?['body/contentBytes'], '" 
}'))
 
4) Send email to PIC
 
So when the PIC receives email, she cannot open the attachment:
 
Please help me figure out the solution for this.
 
Thank you.
Categories:
  • Suggested answer
    Ellis Karim Profile Picture
    11,012 Super User 2025 Season 1 on at
    Attachments are corrupted in Outlook
     
    This is a "known issue", unfortunately. Please try the following, which uses a modified "Append to Array" action:
     
    Power Automate Ellis Karim Send Email with attachments and Append to array action file attachments
     
    We don't need to get a Get Attachments action, because the body of the email already contains all the attachments.
    The expressions I used are shown below. This code can be copied and pasted as is:
    {
      "name": "@{items('Apply_to_each')?['DisplayName']}",
      "contentBytes": {
        "$content-type": "@{body('Apply_to_each')?['$content-type']}",
        "$content": "@{body('Apply_to_each')?['$content']}"
      }
    }
     
    
     
    Or, if you want to type in the expressions yourself:
    {
      "name": items('Apply_to_each')?['DisplayName'],
      "contentBytes": {
        "$content-type": body('Apply_to_each')?['$content-type'],
        "$content": body('Apply_to_each')?['$content']
      }
    }
    
     
    Here is the sample runtime output of the Append to array action:
     
    Power Automate Ellis Karim Append to array action file attachments
     
     
    To learn more, please see: 
     
     
    Ellis Karim
    Ellis Karim
    Blog | LinkedIn | Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
     

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

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 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 >