cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kcg633755
Helper I
Helper I

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
RezaDorrani
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

v-litu-msft
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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (53,217)