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

Multiple optional attchments to email

Hi!

I have a flow in which I analize separately the content of 4 excel files, and keep only those who have data.

The idea is to send an email only with files having content (not empty)

So, I managed to do that, but in the end, when i compose the send email part, I need to stablish the 4 files, and when some of the files are empty, the flow fails.

 

What I need is the versatility of the email being send with 0 , 1 , 2 , 3 or 4 files, according to the content

ny idea?

4 REPLIES 4
manuelstgomes
Community Champion
Community Champion

HI @AndreaMeras 

 

It's possible. You can build the "array" of attachments along the way and when you send the email, provide that array as the attachments parameter.

Here's an article on how to add attachments dynamically to an email

 

Is this what you need?

 

Cheers
Manuel

------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.

AndreaMeras
Frequent Visitor

Thanks Manuel! I tried and the flow doesnt fail but I receive an empty mail (no attachments). I will have to see what Im doing wrong with the array. 

AndreaMeras_1-1660070743557.png

 

 

 

manuelstgomes
Community Champion
Community Champion

Hi @AndreaMeras 

 

I need to change the article in one print screen. The "ContentBytes" should be like this:

"ContentBytes": <base64>

and not 

"ContentBytes": "<base64>"

 

The issue could be the double quotes!

 

Cheers
Manuel

------------------------------------------------------------------
If I have answered your question, please mark it as "Accept as Solution." It will help other members find the solution faster. If you like my response, please give it a Thumbs Up. ?
Otherwise, reply to it, and the community will do its best to help you.

AndreaMeras
Frequent Visitor

Hi Manuel,

I tried already but that didnt solve the issue. I still receive an empty email. I tried the conditions separately and it works, (without the need for the array) but when I have them all together they fail

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,457)