cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Trigger email from excel and then update a row inserting yes into a cell

Hi,

I was wondering if anyone could help with the following. 

 

I have created a flow which sends an email when a value of 3 appears in a row of excel.

 

For example:

 

StudentCountComplete
Sarah1 
John 2 
Brad3 
Paul1 
Tony2 

 

I have used a filter query to look for value of 3.

 

At the moment the flow looks like:

Count 3.JPG

 

I have tried and it works.

 

However, when another person receives a 3, it sends an email for the new student and a second email (duplicate) for the original student.

 

As a work around, I would like know how to add a step after the email is sent for the word Yes to be inserted in the completed column.

 

For example:

Count 3 a.JPG

 

I am hoping if I then add a condition or additional filter query to not only look for 3, but also a blank cell, it will then no longer send a duplicate for the one which is 3 and Yes.

 

I am sorry of this doesn't make sense.

 

If anyone could advise the next step after the email is sent in order to insert the Yes in the cell it would be appreciated.

 

Cheers

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Hi @Newbie2019 you're almost there with what you've done but you need to add in a condition to check the Complete column in the the spreadsheet.

So we've just changed Tony's grade to 3:

0-changeTo3.png

Then we have the trigger and the List rows present in a table as you'd done:

1-Trigger-ListRows.png

In your apply to each you'd just added the Send an email (V2) action which would send it, as you discovered, to everyone with a grade of 3. We don't want to do that so add a condition, select from the dynamic content Complete  is not equal to Yes.

Leave the red If no channel empty. In the green If yes channel add an Update row action.  In the key column type Student and in the key value field select Student from the dynamic content - for this to work your Student column in the spreadsheet must have unique values. In the Complete field enter Yes.

2-Apply-Condition-Update.png

Then under the Update a row add the Send an email (v2) action:

3-SendEmail.png

 The flow will update the row for that student and put Yes in the Complete field.

4-RowUpdated.png

This will of course modify the file again so the flow will trigger again, but that's no problem because those with a grade of 3 now have Yes in the Complete column so it won't send an email; the flow will go down the red If no channel in the condition.

Hope that helps.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

 

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Hi @Newbie2019 you're almost there with what you've done but you need to add in a condition to check the Complete column in the the spreadsheet.

So we've just changed Tony's grade to 3:

0-changeTo3.png

Then we have the trigger and the List rows present in a table as you'd done:

1-Trigger-ListRows.png

In your apply to each you'd just added the Send an email (V2) action which would send it, as you discovered, to everyone with a grade of 3. We don't want to do that so add a condition, select from the dynamic content Complete  is not equal to Yes.

Leave the red If no channel empty. In the green If yes channel add an Update row action.  In the key column type Student and in the key value field select Student from the dynamic content - for this to work your Student column in the spreadsheet must have unique values. In the Complete field enter Yes.

2-Apply-Condition-Update.png

Then under the Update a row add the Send an email (v2) action:

3-SendEmail.png

 The flow will update the row for that student and put Yes in the Complete field.

4-RowUpdated.png

This will of course modify the file again so the flow will trigger again, but that's no problem because those with a grade of 3 now have Yes in the Complete column so it won't send an email; the flow will go down the red If no channel in the condition.

Hope that helps.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

 

View solution in original post

Highlighted

@RobElliott Thank you so much. It worked perfectly. Your explanation was extremely clear and well presented. Thanks again.

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 (8,011)