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

Issue condition yes/no with attachments

Currently I have a flow built that, when a item is added to a share point list, an email goes out to another team. However, when i add the condition below to if it sees the attachment it send the email with the attachments in the email. But when i select no, which just sends the emails if no attachments are there, it just sends the email only. Currently this is not working and was working before but some reason just stopped working today. Can some one assist me? 

 

2020-01-15_16-42-59.png

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Issue condition yes/no with attachments

 

Hi @chucksta ,

 

Did you add attachments when you created the item, or did you add attachments after creation? Has attahcment will be true only if an attachment was added when the item was created.

 

You can try adding just one attachment and see if the value of Has attachment is true.

 

In addition, please use the following configuration in Append to array variable 2 action:

{
"Name": @{items('Apply_to_each_2')?['DisplayName']},
"ContentBytes": @{body('Get_attachment_content_2')?['$content']}
}

 

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

Re: Issue condition yes/no with attachments

Hi @chucksta 

 

In your IF condition you are using an expression not equal to null. 'Has Attachments' is a boolean value so use the expression not equal to false here.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Community Support
Community Support

Re: Issue condition yes/no with attachments

 

Hi @chucksta ,

 

Your configuration does not seem to meet your needs, you can refer to the screenshot below to try to improve the configuration of Flow.

22.PNG23.PNG

Please take a try.

 

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.
chucksta Helper II
Helper II

Re: Issue condition yes/no with attachments

@v-bacao-msft  Thank for your help. I finally got the true statement to work, however it will not submit on the yes statement.

 

In my list it has three attachments on this case below:

 

2020-01-16_12-47-11.png

 

 

 

However after I run the test on the flow, it show that the status is false which, triggers the email with no attachments as seen below and show false in the has attachment field:2020-01-16_12-44-49.png

 

I know I have attachments there and have tried .doc,.pdf, .jpg, .png and nothing is being seen. I also tried to change the values to use all columns in the "Limit Columns by View" in my "When a item is added".  Can it be something i'm missing?

 

Another thing i noticed is that, the flow is sending it out as three emails, im thinking for the three attachments, when i just want the three attachments to go to one email recipients, if "yes" condition is true, and just email goes out if there is no attachments.

Below is my setup after trying your suggestions.

 

Below is what is in my array variable 2:

{
"Name": @{items('Loop_Through_Attachments')?['DisplayName']},
"ContentBytes": @{body('Get_attachment_content')?['$content']}
}

But now I am getting Expression is invalid, but it was working fine as of a couple of days ago.

 

2020-01-16_12-28-56.png

Community Support
Community Support

Re: Issue condition yes/no with attachments

 

Hi @chucksta ,

 

Did you add attachments when you created the item, or did you add attachments after creation? Has attahcment will be true only if an attachment was added when the item was created.

 

You can try adding just one attachment and see if the value of Has attachment is true.

 

In addition, please use the following configuration in Append to array variable 2 action:

{
"Name": @{items('Apply_to_each_2')?['DisplayName']},
"ContentBytes": @{body('Get_attachment_content_2')?['$content']}
}

 

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

chucksta Helper II
Helper II

Re: Issue condition yes/no with attachments

Thanks Sir, I had to remove the apply to each for the yes and no statements and now it works!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (7,686)