cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SachinG31
Helper IV
Helper IV

Files on Emails are getting corrupted

Hello All, 

 

My flow picks attachments from Share point list and send dynamically on email through outlook, but the attachment receives on emails are corrupted and does not open. It shows like this on email.

SachinG31_0-1633440512507.png

I am aware , there is something wrong while appending to array variable. but i did lots of research and found below code for perfect attachment transfer. but this also does  not work most of the times.

 

{
  "Name": "@{items('Apply_to_each_13')?['DisplayName']}",
  "ContentBytes": {
    "$content-type": "@{body('Get_attachment_content_2')['$content-type']}",
    "$Content": "@{body('Get_attachment_content_2')['$content']}"
  }
}

 

SachinG31_1-1633440694013.png

Please advise , if i need to change anything here.

 

 

  

2 ACCEPTED SOLUTIONS

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @SachinG31 ,

 

Try the below:

 

ericcheng_0-1633441039059.png

 

Here is a link to the full article

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

View solution in original post

Hello @eric-cheng ,

I tried on this again and this time i write the formula rather than copy paste (I don't know how it make difference 😐 ). Also i removed double quotes from the dynamic value for for name and content bytes.

And its working fine till now attachment are showing content.

SachinG31_0-1634011311466.png

 

Thanks for the Help. 

View solution in original post

3 REPLIES 3
eric-cheng
Solution Sage
Solution Sage

Hi @SachinG31 ,

 

Try the below:

 

ericcheng_0-1633441039059.png

 

Here is a link to the full article

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

View solution in original post

Hello @eric-cheng , Thanks for looking into this , i have tried this but documents are still comes as corrupted. Document is fine and opens manually , i tried by other document , its still the same.

SachinG31_0-1633494535312.png

SachinG31_1-1633494565863.png

 

Hello @eric-cheng ,

I tried on this again and this time i write the formula rather than copy paste (I don't know how it make difference 😐 ). Also i removed double quotes from the dynamic value for for name and content bytes.

And its working fine till now attachment are showing content.

SachinG31_0-1634011311466.png

 

Thanks for the Help. 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,399)