cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Attachment corruption on approval emails

Hello all,

We have created an approval workflow with multiple attachments but we cannot figure out why the attachments don't work once in the the approval email. The screenshot below is the coding which we have used. We tested an approval with 3 attachments; two of them open as blanks and one opens with the error message below. All three attachments are fine when uploaded to the SharePoint list.

MicrosoftTeams-image (3).pngMicrosoftTeams-image (4).png

Tagging @ChristianAbata as you kindly helped solve my previous workflow issue.

Thank you!

2 ACCEPTED SOLUTIONS

Accepted Solutions

Hey @MBach20 

You only need to add the 'File Contents' property inside the base64() expression... you shouldn't add the $content extra elements.

1.jpg

Anyhow you shouldn't need to do this... I have just tested, see below which works:

2.jpg

 

 

HTH

Jay

View solution in original post

Hey @sbtrying 

Please refer to the post... you are using an incorrect JSON element.

ContentBytes should just be content

This video covers this in detail: https://powerusers.microsoft.com/t5/Webinars-and-Video-Gallery/Add-Multiple-Attachments-to-an-Approv...

HTH

Jay

View solution in original post

10 REPLIES 10
Super User II
Super User II

hi @MBach20  please try adding in your json format the next format

 

[{"Name":"asdasd.docx","ContentBytes" : "HERE YOUR CONTENT IMAGE"}]

 

See you have content instead content bytes.

 

Let me know xD 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Super User II
Super User II

Hey @MBach20 

Try wrapping the 'File Contents' property in the base64() expression... this will instruct Flow to pass just the base64 $content and not the entire file contents value.

May be of interest - https://blog.encodian.com/2020/07/working-with-file-contents-and-files-in-power-automate/

HTH

Jay

Community Support
Community Support

 

Hi @MBach20 ,

 

If the attachments come from the SharePoint list, you can refer to the following configuration:

58.PNG59.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @ChristianAbata 

 

Thank you for your reply! 

I understand from previous posts (and have tested this as well) that ContentBytes works for multiple attachments for "send an email", however for approval workflows, the json required is just "Content".

Hi @Jay-Encodian 

Thank you for your reply - we just gave this a go (hopefully we got it right), however the same error appears;

MicrosoftTeams-image.png

MicrosoftTeams-image.png

Hi @v-bacao-msft 

Thank you for your reply! We copied the exact output you have provided, however the following error appears:

MicrosoftTeams-image.png

Hey @MBach20 

You only need to add the 'File Contents' property inside the base64() expression... you shouldn't add the $content extra elements.

1.jpg

Anyhow you shouldn't need to do this... I have just tested, see below which works:

2.jpg

 

 

HTH

Jay

View solution in original post

Thank you!
New Member

@Jay-Encodian 

 

sbtrying_1-1611247132479.png

How do I fix this error?

 

 

 

Hey @sbtrying 

Please refer to the post... you are using an incorrect JSON element.

ContentBytes should just be content

This video covers this in detail: https://powerusers.microsoft.com/t5/Webinars-and-Video-Gallery/Add-Multiple-Attachments-to-an-Approv...

HTH

Jay

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (8,041)