cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

How to send an email when a response is submitted and the sharepoint list column has a certain value

Hi all

 

I am trying to send an email when 2 conditions are met:

 

First, when a response is submitted and the email goes into the sharepoint list called "Registered Users":

 

23213f.JPG

 

Second, when the sharepoint list "Onboarding KPI - Completion" column called "Count" has a value of 6 for the user that was registered already:

8728728732.JPG

 

 

So if email exists in both sharepoint lists and the count is six, then send an email. In the above example, "disaenz" should get an email.

 

I tried a flow like this but was unsuccessful:

 

223fdg.JPG

09090dfk.JPG

 

How can I get it right?


Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@diegoandre10 

First, I am assuming that there is only one entry in the Onboarding KPI list for a given email address - is that a correct assumption?

In addition, I am assuming that there will always be an entry for a user in the Onboarding KPI list when a Forms is submitted and the entry is added to the Registered Users list.

You need to filter the data coming from the Onboarding KPI list so that only items where the title equals the email address are returned - if the email address is unique in each list then only one row of data should be returned.  

Click on Show advanced features and configure the filter query like what I have below:

image.png

 

Replace XXX with a reference from Dynamic properties to the individuals email address.  If the user is the one who submitted the Form you can usually get that from the response details.  Also note the single quotes around where the email address will be - they are required.

Please let me know if this works for you.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

@diegoandre10 

First, I am assuming that there is only one entry in the Onboarding KPI list for a given email address - is that a correct assumption?

In addition, I am assuming that there will always be an entry for a user in the Onboarding KPI list when a Forms is submitted and the entry is added to the Registered Users list.

You need to filter the data coming from the Onboarding KPI list so that only items where the title equals the email address are returned - if the email address is unique in each list then only one row of data should be returned.  

Click on Show advanced features and configure the filter query like what I have below:

image.png

 

Replace XXX with a reference from Dynamic properties to the individuals email address.  If the user is the one who submitted the Form you can usually get that from the response details.  Also note the single quotes around where the email address will be - they are required.

Please let me know if this works for you.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Highlighted

Hi @ScottShearer 

 

When I try to test the flow when a response is submitted nothing happens:

 

dfdsfdfsd3221.JPG

 

 

One thing I notice is that even though I just have 1 form created, in Power Automate I see 3:

 

l2;le232.JPG

 

I changed the flow as you mentioned but nothing happens:

 

sdsa2.JPG

4323f.JPG

 

Any idea what could be wrong?

 

Thanks!

Highlighted

Hi @ScottShearer !

 

Do you see any potential mistake in my last flow?

 

Thanks!

@diegoandre10 

Sorry for the delayed response.

Take a look at the output of a run - were any records returned from Get items?

The comparison is case sensitive - verify that the email address that was submitted via Forms matches the case of what is in the list.  If that is the issue, I'll show you how to correct.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (12,662)