Notify Users In Teams For Modified Values Using Power Automate

Introduction

 
I this blog, we will learn how users will get notified in Microsoft Team when a particular column value has been changed in the SharePoint list using Power Automate.

Table of content
  1. Get changes from SharePoint item or file 
  2. Get the list of columns that are modified
  3. Get specific version for SharePoint Items or files
  4. Get previous value
  5. Send a message to Channel in Microsoft Team
Step 1
 
Create a new power automate from "Automated Cloud Flow Templates" and select the "When item and file are modified" template.
 
Notify Users In Teams For Modified Values Using Power Automate
 
Step 2 - Get changes from SharePoint item or file

Select SharePoint site and list on which you want to set up the notification process.
 
Notify Users In Teams For Modified Values Using Power Automate
 
Step 3 - Get the list of columns that are modified

To get changes for an item that is modified select action,
 
Notify Users In Teams For Modified Values Using Power Automate
 
Step 4 - Get specific versions for SharePoint Items or files
 
To get a specific version value for the SharePoint list or file, we need to use the Rest query.

EndPoint
  1. https://dev1802.sharepoint.com/sites/Home/_api/web/lists/getByTitle('Issue tracker')/items(1)/versions(2)    
To call est API in Power Automate, Select action "Send an HTTP Request To SharePoint".
  1. // For get verison ID  
  2. @{outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/SinceVersionId']}    
  3. // For get Item ID  
  4. @{triggerOutputs()?['body/ID']}   
Notify Users In Teams For Modified Values Using Power Automate 
Note
If versioning is not enabled on the list, This action will throw an error and you will not get the expected result.
 
Notify Users In Teams For Modified Values Using Power Automate
 
Step 5 - Get the previous value
 
Now, we need to get the previous version value for the "Status" column. So, Select "Compose Action" in Power Automate,
 
Notify Users In Teams For Modified Values Using Power Automate
 
We could get value for the Status column from the output of "Get Previous Versions values".
  1. @{body('Get_Previous_Version_Values')['d']['Status']}  
You could add condition before getting value. If Status colum value has changed then it will go to get value else do nothing.

To check status column value changed or not,
 
Notify Users In Teams For Modified Values Using Power Automate
 
Step 6 - Send a message to Channel in Microsoft Team

Select action "Post message in chat or channel",
 
Notify Users In Teams For Modified Values Using Power Automate 
 
Full Power Automate looks as below,
 
Notify Users In Teams For Modified Values Using Power Automate