Hello,
I'm trying to include attachments from an attachment field in a SharePoint list so that multiple attachments may be dynamically included. I'm able to set up the array and send attachments, but they become corrupt and can't be opened.
What might I be doing wrong in my flow?
The current structure is:
- When a new item is created
- Initialize array variable
- If has attachments is true
- Get attachments, ID from the list item created
- Apply to each, body from Get Attachments
- Get attachment content, ID = ID from list item, File identifier = Id from Get Attachments
- Append to array:
{
"Name": "@{items('Apply_to_each')?['DisplayName']}",
"ContentBytes": "@{outputs('Get_attachment_content')?['body']?['$content']}"
}
- Send an email, attachment array in the attachments field