cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MarcoQ96
Level: Powered On

Can MS Flow Send An Email With An Empty Attachments Array?

I have a flow that triggers through PowerApps when a user clicks on a button which creates a new SharePoint list item. This item may or may not contain attachments uploaded by the user (uploading an attachment is optional).

In my flow, I have the following actions:

 

1.JPG2.JPG

 

 

Will the flow still send the email even if the attachments array is empty due to the user not uploading any?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Can MS Flow Send An Email With An Empty Attachments Array?

It should work just fine without an attachment. If forwhatever reason it doesn't because of your variables, you can just add a condition after the Get item step to check for an attachment. From there you could have a Send email step in both the Yes and No conditions, with the yes step taking the additional steps and parameters required for handling attachments and the no step simply sending a basic email. 

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
Super User
Super User

Re: Can MS Flow Send An Email With An Empty Attachments Array?

It should work just fine without an attachment. If forwhatever reason it doesn't because of your variables, you can just add a condition after the Get item step to check for an attachment. From there you could have a Send email step in both the Yes and No conditions, with the yes step taking the additional steps and parameters required for handling attachments and the no step simply sending a basic email. 

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

Community Support Team
Community Support Team

Re: Can MS Flow Send An Email With An Empty Attachments Array?

Hi @MarcoQ96 ,

 

According to Flow configuration, if the item does not contain any attachments, the actions in Apply to each will not be executed, and email will not be sent.

It seems that you want to send all the attachments contained within one item in on an single email. You need to configure Send email with option action outside of Apply to each.

Image reference:38.PNG

 

If you want to send an email only when the item contains an attachment, you could use Has attachment to determine if the attachment is included in the item. If it is not included, the email will not be sent.39.PNG

 

For details on Send multiple attachments on a single email, please refer to Blog:

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

Please note that there are some possible solutions to the problems in the comments below the blog.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,908)