cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Send mail when status changes in SP list. (Trigger doesn't work)

Hi,

I have been trying to create a flow so that, when the status of a sharepoint list changes, an email is sent (depending on its status, it is a different email). I have tried with a "Trigger Conditions" but it has not worked for me. I tried putting "@equals(triggerOutputs()?['body/Status/Value'],'Completed','Rejected']" But the workflow doesn't work (doesn't throw error).

Then, I makea call to "Get changes for an item or a file" and finally, apply a "Condition" where if "Has Column Changed: Status" is equals to "true".

 

Does anyone have an idea to send personalized emails for each state?

 

Regards

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous 

As I mentioned earlier, you won't be able to use a trigger condition.

In your Flow, add a condition that checks to see if the column of interest to you has changed.  If yes, send the emails.  If no, use a control terminate action (with success) to stop the Flow.

image.png

image.pngimage.png

 

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

6 REPLIES 6
ScottShearer
Super User
Super User

@Anonymous 

You won't be able to create a triiger condition that tests if a column has changed.  As you already found out, the only way that you'll be able to determine if a column has changed is with a Get changes for an item or a file (properties only) action.

Can you explain more about what you want to do when you say "send personalized emails for each state"?

 

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

Scott
Anonymous
Not applicable

Hi @ScottShearer ,

Thanks for your answer.

In answer to your question, what I am looking to do is that if the List Status changes to "Completed", an email is sent with a structure where some information is added. If you change the status to "Processing", you will be sent an email with a structure containing process data. Finally, if the status changes to "Rejected", an email is sent with confidential information and comments on why it has been rejected.

 

Emilio

ScottShearer
Super User
Super User

@Anonymous 

I suggest using a Switch action to send the email.

  1. Use a When an item or file is modified trigger
  2. Add a Get changes for an item or a file (properties only) action action
  3. Add a condition that checks if your status column has changed
  4. On the true side of the condition, add a switch action and send emails as appropriate

 

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

Scott
Anonymous
Not applicable

@ScottShearer thanks for you help.

Regarding a scenario, I have a query.

 

In the event that other columns other than the status are modified, the flow would continue to execute, only without sending emails. Is there a way to prevent this from happening? For example, adding a "Trigger condition" ? And if so, how could it be? since the ones that have occurred to me have not worked.

 

I really appreciate your help, it's part of my path to continue learning.

@Anonymous 

As I mentioned earlier, you won't be able to use a trigger condition.

In your Flow, add a condition that checks to see if the column of interest to you has changed.  If yes, send the emails.  If no, use a control terminate action (with success) to stop the Flow.

image.png

image.pngimage.png

 

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

Scott
Anonymous
Not applicable

@ScottShearer 

Thanks you so much, I have performed the steps according to what you have explained to me and it works perfectly. I will leave photos of how it was in the future, someone is useful.

 

Emilealonso_0-1651152969445.pngEmilealonso_1-1651153005404.pngEmilealonso_2-1651153028266.png

 

Regards

 

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,437)