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 / Passing blank values a...
Power Automate
Answered

Passing blank values as attachments

(1) ShareShare
ReportReport
Posted on by 75
I've built a flow from Microsoft Excel that allows a user to basically click on a row and send information included in that row in an email.  I've added three inputs to the row selection step in which the user can upload documents that can be attached to the email (see the screenshot below):
Here is the Send an email (V2) step:
The Send an email (V2) step works properly ONLY IF someone uses all three file upload inputs.  If any of the file inputs are left blank, the Send an email (v2) step fails (Bad Request - Attachment namee and content bytes cannot be null or empty).
 
How can this flow be modified so that the flow will still run even if all three file upload inputs are not used?
 
Thank you!
Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,397 Most Valuable Professional on at
    The easiest fix would be to create an array variable in the flow and then test each file to make sure its no empty.  If its there then append it to the variable as a record with two properties, Name and ContentBytes. Then use the variable array as input to the attachments in the email.  

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard