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...
I believe I should see the "ContentBytes" field in the 'Add attachment' field but this is what I see...
Any idea what I might be missing?
Solved! Go to Solution.
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.
Proud to be a Flownaut!
Community Leader: Black Country PowerApps & Flow User Group
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
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.
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.
Proud to be a Flownaut!
Community Leader: Black Country PowerApps & Flow User Group
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
45 | |
41 | |
37 | |
36 | |
22 |
User | Count |
---|---|
44 | |
36 | |
31 | |
28 | |
27 |