Forum Discussion

goulp99's avatar
goulp99
Copper Contributor
Dec 12, 2022
Solved

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

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 b...
  • RobElliott's avatar
    Dec 15, 2022

    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":

     

     

    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)

     

     

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

     

     

     

    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.

     

     

    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

Resources