web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Multiple optional attc...
Power Automate
Unanswered

Multiple optional attchments to email

(1) ShareShare
ReportReport
Posted on by 14

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?

Categories:
I have the same question (0)
  • manuelstgomes Profile Picture
    6,625 on at

    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 Profile Picture
    14 on at

    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 Profile Picture
    6,625 on at

    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 Profile Picture
    14 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard