cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
S_J_G
Helper II
Helper II

when a new email arrives, do X only if not contains attachment

Dear fellow Users,

 

I have a question regarding setting up my conditions the right way. have done the following:

When a new email arrives > Email Body to string> condition: Contains attachment(s) = not true >insert row in excel table.

 

But the output is always: false, i really dont get it.image.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @S_J_G ,

 

Please try the following method, set Has Attachment to blank and configure Condition as below:

164.PNG

Hope this helps.

 

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.

View solution in original post

5 REPLIES 5
efialttes
Super User
Super User

Hi!

Are you evaluating trigger output 'HasAttachment' value in your condition? And the operator you are using in 'not contains'?

If so, I would suggest to use 'not equals' instead.

 

Pleaase also note I think this parameter leads to confusions sometimes, as explained here

https://www.reddit.com/r/MicrosoftFlow/comments/fejjr3/when_new_email_arrives_has_attachment_empty/

My suggestion is to evaluate attachments lenght instead

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



HI @efialttes 

 

In the photo i use: Has Attactment > 'not equals' > 'True'

that's why i don't get it

 

Also Advanced mode is gone, lots of people online suggested it as solution.

Hi again
Did you try my second suggestion?
On the left side of your condition:
length(triggerBody()?['attachments']
On the right side of your condition:
0
Operator: equals

Hope this helps


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



v-bacao-msft
Community Support
Community Support

 

Hi @S_J_G ,

 

Please try the following method, set Has Attachment to blank and configure Condition as below:

164.PNG

Hope this helps.

 

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.

View solution in original post

hi @v-bacao-msft Thx!

Flow working properly now!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,178)