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

Sending multiple Attachements via Mail by pre-using the "Select-Operator"

Hello Folks,

 

I am trying to set up a flow which sends an E-mail with multiple attachements. I found some threads which descibes the datapreparation process via Apply-to-each loop. 

 

https://flow.microsoft.com/de-de/blog/multiple-attachments-single-email/

http://saltypc.com/?p=619

 

In my experience the Apply-to-each approach consumes a lot of time. Instead I would like to use the Array-"Select" operator and set the output of this operation as the new attachement input for the "Send an E-Mail" Operation.

 

Sadly this doesn't seem to work for me. I am getting the error that

 -> "Parameter 'Attachment Name' cannot be null or empty.
 
Below you can see a snapshot from the test-input of the step "Send an E-Mail" the Attachements-Input seems for me valid. 
 
[...] okmark:_MailOriginal'></span>\n\n<p class=MsoNormal><span lang=DE style='mso-ansi-language:DE'><o:p>&nbsp;</o:p></span></p>\n\n</div>\n\n</body>\n\n</html>\n","Attachments":[{"Attachment Name":"Test-250724.pdf","Attachment Content":"JVBERi0xLjQKJYCAgIAKMSAwIYWlsZXIKPD [...] MiAwIFIgL0lEIFs8kEDI5NDU4CiUlRU9GDQo="},{"Attachment Name":"Test_Sign.svg","Attachment Content":"PD94bWbj0 [...] DQo8L3N2Zz4="}],"Importance":"Normal","IsHtml":true}}
 
Could you give me an idea which might be wrong here in this approach?
 
Best Regards,
Lukas
1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @GBLukas 

 

Can you please post a screenshot of the flow?

 

Can you ensure that the attachments array has the attributes as:

{

"Name" : "filename.extension",

"ContentBytes" : contentbytes

}

 

You need to ensure that the attachments array that you are creating has these attributes (Name and ContentBytes as mandatory). 

 

If you could share a screeshot we might better identify the issue and assist you with this. 

 

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!

View solution in original post

2 REPLIES 2
yashag2255
Dual Super User II
Dual Super User II

Hi @GBLukas 

 

Can you please post a screenshot of the flow?

 

Can you ensure that the attachments array has the attributes as:

{

"Name" : "filename.extension",

"ContentBytes" : contentbytes

}

 

You need to ensure that the attachments array that you are creating has these attributes (Name and ContentBytes as mandatory). 

 

If you could share a screeshot we might better identify the issue and assist you with this. 

 

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!

View solution in original post

Hi @yashag2255 

 

I wasnt beware of the fact that the array must have the specific key Names "Name" and "ContentBytes". I changed the Key-Names and now its working like a charme.

 

Thank you very much!

 

Best Regards,

Lukas

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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

Users online (30,157)