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

Attachment to email from SP list

Hi all.

I have this issue in adding attachments to my email from sharepoint list.

I have a sharepoint list that may have 1 or 2 attachments and I need it to add it to a email notification

Capture.PNG

the flow runs fine till it reaches the end and I get this  error:

The 'inputs.parameters' of workflow operation 'Send_an_email_(V2)' of type 'OpenApiConnection' is not valid. Error details: The API operation 'SendEmailV2' is missing required property 'emailMessage/Attachments/0/ContentBytes'.

 

here is my flow:

  • from my forms i use the parse json to grab the files and put it into sharepoint.Capture1.PNG
  • then i use the get attachment and attachment contents connectors to put the files in to an array which then i insert into the email

Capture2.PNG

Then I put this array into the email attachment sectionCapture3.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

When you add the content to the array that you will use to load the attachments you called it "Content" not "ContentBytes". Email is looking for a specific field name in the attachments array.  Notice that the error says its missing a required field called ContentBytes.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Pstork1
Dual Super User III
Dual Super User III

When you add the content to the array that you will use to load the attachments you called it "Content" not "ContentBytes". Email is looking for a specific field name in the attachments array.  Notice that the error says its missing a required field called ContentBytes.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

ctw1991
Frequent Visitor

Hi @Pstork1,

Thanks I've changed it to ContentBytes. Silly mistake by me. Much appreciated!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,500)