cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

Multi attachment email - Error

Hi, 

I tried following this Flow: https://preview.flow.microsoft.com/en-us/blog/multiple-attachments-single-email/

And also had a look at a couple of other discussions in this forum. 

Yet, when I try to replicate things, I get an error saying that 

{
"status": 400,
  "message": "Parameter 'Attachment Content' cannot be null or empty.\r\nclientRequestId: 2960f4c2-d0ff-439d-ab24-2baa52760795",
  "source": "office365-we.azconn-we.p.azurewebsites.net"
}
 
Attached are the files that I stored on a SharePoint document library and that I want to add all as attachment.
The files are XML and PDF documents.
f1.png
 
 
My flow looks as follows:
 
f2.pngf3.png
 
 
I even put an additional compose step before sending the email just to check that the content is not empty.
 
What is going wrong here?
Any help would be appreciated.
 
Many thanks,
 
Ludwig
 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User II
Dual Super User II

Re: Multi attachment email - Error

Hi @lreinhard7 

 

have you used ContentByte or ContentBytes

 

the s is required

 

next try using expression  

 

"ContentBytes": base64(filecontentdynamiccontent)

 

 

the bold part is expression

 

 

View solution in original post

12 REPLIES 12
Highlighted
Super User III
Super User III

Re: Multi attachment email - Error

@lreinhard7 

In your append to variable array action, try removing the double quotes around the filename with extension.  Please let me know if that works for you.

 

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

Scott
Highlighted

Re: Multi attachment email - Error

Hello Scott, 

Just tested that but still get the same 400 error message...

Best regards, 

Ludwig

Highlighted
Dual Super User III
Dual Super User III

Re: Multi attachment email - Error

Hey @lreinhard7 

 

In place of Content you should have ContentBytes. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Dual Super User II
Dual Super User II

Re: Multi attachment email - Error

Hi @lreinhard7 

 

replace "Content" with "ContentBytes"

 

Regards,

Reza Dorrani

 

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

Highlighted
Super User III
Super User III

Re: Multi attachment email - Error

@lreinhard7 

The following worked for me:

ContentBytes.jpg

Change Content to ContentBytes.

 

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

Scott
Highlighted

Re: Multi attachment email - Error

Hi, 

Many thanks for the hint with the ContentByte term this kind of resolved one error. 

Yet, now I receive the error:

status": 400,
  "message": "No input parameters provided. Please provide required input parameters 'To', 'Subject' and 'Body'.\r\nclientRequestId: 4b1e9ced-1d72-4232-856a-3bf7d8e95e36",
  "source": "office365-we.azconn-we.p.azurewebsites.net"
This is strange because I entered the to, subject and body fields...
Interesting 😞
Best regards,
Ludwig
Highlighted
Dual Super User II
Dual Super User II

Re: Multi attachment email - Error

Hi @lreinhard7 

 

have you used ContentByte or ContentBytes

 

the s is required

 

next try using expression  

 

"ContentBytes": base64(filecontentdynamiccontent)

 

 

the bold part is expression

 

 

View solution in original post

Highlighted

Re: Multi attachment email - Error

Hello RezaDorrani

That is amazing. The base64 expression did the job!Smiley Happy

Many thanks for that. 

Best regards, 

Ludwig

Highlighted

Re: Multi attachment email - Error

Hi, 

After making some changes to my flow to make it run fast I run into another issue where I need some help. 

The problem that I currently have is that either no attachment is created or that an attachment file is created that I cannot open. 

Here are some of the things I tested:

Option 1: No attachment created

Option1NothingAttached.png

Option 2: Same as Option 1

Option2NothingAttached.png

 

Option 3: Error message that the attachment name cannot be null

Option3_ErrorAttachmentNameCannotBeNullOrEmpty.png

 

Option 4: Error unable to read message or attachment

Option4_ErrorUnableToReadMessageOrAttachmentContent.png

 

 

Option 5: Attachment file created but it cannot be opened 

Option5_AttachmentCreatedButOnlyAsSingleFilethatCannotBeopened.png

 

 

Any help would be highly appreciated. 

 

Many thanks, 

Ludwig

 

 

 

 

 

 

 

 

 

Highlighted
Dual Super User III
Dual Super User III

Re: Multi attachment email - Error

Hey @lreinhard7 

 

You can refer to the below screenshot. You need to have the Name while creating the array itself. And do not create that again in the send email action

er4.PNG

The display name is because my attachments are from sharepoint. You can have the custom filename there and ensure you have the right extension along with that. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Microsoft
Microsoft

Re: Multi attachment email - Error

Did you ever figure out what caused this issue? I am getting the same error.
Highlighted

Re: Multi attachment email - Error

Not really.

After deleting things again and starting from scratch things sometimes work. ... 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (7,614)