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
- Get changes from SharePoint item or file
- Get the list of columns that are modified
- Get specific version for SharePoint Items or files
- Get previous value
- 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.
Step 2 - Get changes from SharePoint item or file
Select SharePoint site and list on which you want to set up the notification process.
Step 3 - Get the list of columns that are modified
To get changes for an item that is modified select action,
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
To call est API in Power Automate, Select action "Send an HTTP Request To SharePoint".
-
- @{outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/SinceVersionId']}
-
- @{triggerOutputs()?['body/ID']}
Note
If versioning is not enabled on the list, This action will throw an error and you will not get the expected result.
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,
We could get value for the Status column from the output of "Get Previous Versions values".
- @{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,
Step 6 - Send a message to Channel in Microsoft Team
Select action "Post message in chat or channel",
Full Power Automate looks as below,