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

count the number of attachments in an email

is it possible to count the number of attachments in an email in a Flow condition. so I can achieve some logic like this.

 

if (number of attachments) > 1 

 

thanks

 

Graham

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: count the number of attachments in an email

Hi @DJVIBE,

 

I have made a test on my side and please take a try with the following:

  • Add “When a new email arrives” trigger.
  • Add a Condition, click “Edit in advanced mode”, type the following formula:
@greater(length(triggerBody()?['Attachments']), 1)
  • Within “If/yes” branch of Condition, add “Send me an email notification” action.

Image reference:2.JPG

The flow works successfully as below:3.JPG 

Best regards,

Kris

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

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: count the number of attachments in an email

Hi @DJVIBE,

 

I have made a test on my side and please take a try with the following:

  • Add “When a new email arrives” trigger.
  • Add a Condition, click “Edit in advanced mode”, type the following formula:
@greater(length(triggerBody()?['Attachments']), 1)
  • Within “If/yes” branch of Condition, add “Send me an email notification” action.

Image reference:2.JPG

The flow works successfully as below:3.JPG 

Best regards,

Kris

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

View solution in original post

DJVIBE
Level: Powered On

Re: count the number of attachments in an email

works as advertised! thanks this saved me... cheers!!! Smiley Happy

Helpful resources

Announcements
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 Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,617)