cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ConnellP
Frequent Visitor

Sending an email only if a user has said 'Yes' to a question

Hey all, 

I've got a flow set up to take information from a list and send it in an email. However, the list has two functions and I can only have the emails being sent for one bit of it. For example, I've asked a question with a 'Yes/No' answer. If the user selects 'Yes' I want the flow to approve sending the email, if they've selected 'No' I don't want the flow to do anything. 

How would I do that? I've got it set up currently to automate the email when a new item is created and it then goes to Outlook V2. I know I need to put a Condition in but I'm not 100% sure how to do that, has anyone got any examples? 

Thanks!

6 REPLIES 6
rsaikrishna
Super User
Super User

@ConnellP 

 

You can use Condition action to check if the column value. Based on True or False, you can send the approval email.

Here is the link on using Condition action:

https://docs.microsoft.com/en-us/power-automate/add-condition

 

If you do not want the flow to trigger at all, then you need to place the condition in the flow's trigger condition.

https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Power-Automate-Trigger-Conditions-...

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
efialttes
Super User
Super User

Hi!

"I've got a flow set up to take information from a list and send it in an email. However, the list has two functions..."

 

You are talking about a Sharepoint list, right? If so, can you share a screenshot from its current column design?

Thanx!



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!



Hey, 

Yes I'm talking about a SharePoint list 🙂 

I'll attach a super basic flow, I've tried doing the formula in the 'When item is created' to filter out to only the 'Yes' answers, and I've added in the 'initialize' option too but the flow just didn't work, it either timed out completely or it'd say something about the properties not being right. 
The column I need to use is called 'Have you been in an Office in the last 72 hours?' - if the person answers yes to this, this is when I want the email to send with the information I insert with the dynamic functions.

If they answer no, I don't want the flow to do anything, just have the record saved as it usually wouldBasic flow.png

@ConnellP 

 

Here is a sample:2.JPG

 

In your requirement, in the condition action, you need to place the column "Have you been in an Office in the last 72 hours?" is equal to true.

 

Note: true should be typed in the expression window.

 

I hope this will be helpful.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

@ConnellP 

 

You can also add a trigger condition for the "When an item is created" trigger. 

 

Browse the Settings for "When an item is created" trigger by clicking on 3 dots on the top right corner of the trigger. At the end of the box, you will see trigger conditions.

@equals(triggerBody()?['LikeIt'],true)

You can replace LikeIt with your SharePoint list column.

 

Here is the screen shot of the trigger:

3.JPG 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

Hi!

So the question is... is your Sharepoint column defined as 'Yes/No' column? Or is it of type 'Choice'? Or is it of type 'single line of text'? Other?

https://support.microsoft.com/en-gb/office/list-and-library-column-types-and-options-0d8ddb7b-7dc7-4...

 

Assuming the answer is 'Yes/No' column, @rsaikrishna suggestions are the right approach. If not, please let us knwo the Column type

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!



Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,145)