SOLVED

Triggering an email, with content, based on a column answer

Copper Contributor

Hi,

 

I have a rule setup for my list, where if a particular column (Status) is set to a particular answer (Accepted), then an email is triggered and sent to the original requestor.

 

I want to be able to edit the content of this email, is that possible?  Essentially when a request is accepted, I want the requestor to receive the email notification but for it to include a link to a form.

 

I don't see anywhere to edit the content of this email/notification that's triggered?

2 Replies
best response confirmed by goulp99 (Copper Contributor)
Solution

@goulp99 You can't change anything in an alert. You would need to do this Power Automate. First of all make sure that versiong is switched on in your list settings because we will be comparing the current value of the status column with the previous one.

 

The flow looks like this:

 

1. The trigger is the SharePoint "when an item or a file is modified":

1-Flow.png

 

 

2. The first action is "get changes for an item or a file (properties only)" and in the Since field you need to add the following expression to get the previous version:

 

sub(int(triggerOutputs()?['body/{VersionNumber}']),1)

 

2-Flow.png

 

3. You then add a condition to check if it's the Status column that has changed and if the status is now Accepted

 

3a-Flow.png

 

3b-Flow.png

 

In the green if yes channel add your send an email action. If you are adding links into it cluick the code view button </> and use html tags.

 

4-Flow.png

 

The email can display whichever columns from your list that you want. But you can't change the text of the email on the fly; if the wording was different but standard based on one particular column then you'd need to add a switch action in it (a type of condition) to check that column and in each "case" send the appropriate email.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott 

 

Firstly, thank you Rob! This was really easy to follow and very helpful, I appreciate the detailed response.

 

I've followed the steps above in automate and have created the flow. I've tested it, both manually and automatically, it comes back as successful for both but I don't receive the email notification.  For the email I have configured it to send to "Requestor Email", for testing I am the requestor.

 

Please see screenshots below:

Searching for myself, in the list, as the requestor:

goulp99_0-1671617114809.png

Configured to send email to: "Requestor Email"

goulp99_1-1671617190174.png

 

After testing the flow and changing the status to accepted, as per the defined conditions in this flow, it say's completed successfully, but get the below message:

 

goulp99_2-1671617256198.png

 

1 best response

Accepted Solutions
best response confirmed by goulp99 (Copper Contributor)
Solution

@goulp99 You can't change anything in an alert. You would need to do this Power Automate. First of all make sure that versiong is switched on in your list settings because we will be comparing the current value of the status column with the previous one.

 

The flow looks like this:

 

1. The trigger is the SharePoint "when an item or a file is modified":

1-Flow.png

 

 

2. The first action is "get changes for an item or a file (properties only)" and in the Since field you need to add the following expression to get the previous version:

 

sub(int(triggerOutputs()?['body/{VersionNumber}']),1)

 

2-Flow.png

 

3. You then add a condition to check if it's the Status column that has changed and if the status is now Accepted

 

3a-Flow.png

 

3b-Flow.png

 

In the green if yes channel add your send an email action. If you are adding links into it cluick the code view button </> and use html tags.

 

4-Flow.png

 

The email can display whichever columns from your list that you want. But you can't change the text of the email on the fly; if the wording was different but standard based on one particular column then you'd need to add a switch action in it (a type of condition) to check that column and in each "case" send the appropriate email.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

View solution in original post