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

Add attachment - Content Bytes not present

I am having an issue with the 'Add Attachment' element I am using in my flow. 

 

The file is created however it seems to be corrupted as it fails to open in the sharepoint list and also when I download it.

 

Here is the start of the flow...

Screen Shot 2019-08-12 at 13.54.37.png

I believe I should see the "ContentBytes" field in the 'Add attachment' field but this is what I see...

 

Screen Shot 2019-08-12 at 13.55.14.png

Any idea what I might be missing?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @kcg633755 as has previously been posted you need to include a Get Attachment action. When you use this to create the file, you need to ensure you use the whole body of the output, not just the content, as you need the implied Content Type as well.

 

Attachments.PNG





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

4 REPLIES 4
Dual Super User II
Dual Super User II

Hi @kcg633755 

 

When you are adding attachments, you would be doing so in a for loop for attachments 

 

The attachments Name and attachments Content property would hold the values you need

 

Check flow template - Save my email attachments to a SharePoint document library 

this template will show you exactly how to add the attachment to a library

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Community Support
Community Support

Hi @kcg633755,

 

Before you add attachments, you need to get the attachment content by using Get attachment action. Then append the body('Get_attachment').$content into the File Content blank.Annotation 2019-08-13 140825.png

 

Please have a try, I hope it can help you.

Best Regards,

Community Support Team _ Lin Tu

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

Thanks, I tried this but still finding the same result - the file saves as attachment in the Sharepoint list but it fails to open.

Hi @kcg633755 as has previously been posted you need to include a Get Attachment action. When you use this to create the file, you need to ensure you use the whole body of the output, not just the content, as you need the implied Content Type as well.

 

Attachments.PNG





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

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 (6,428)