Get Current & Previous Item in SharePoint List Using Power Automate

When I work with SharePoint lists in Power Automate, there are times I need to know what changed in a list item. For example, the status of a task may have been updated, or someone changed the assigned person.

In this case, the “Get changes for an item or a file (properties only)” action helps me check exactly what changed in a SharePoint item. Recently, I’ve been working with a client who required the same thing, but this time, they want to show the previous item’s value.

In this tutorial, I will show you how to check which field changed in the SharePoint list and what the previous value was using Power Automate.

Power Automate Current Vs Previous SharePoint Item

Let’s assume you’re helping a team manage tasks using a SharePoint list called ‘Task Management’.

Power Automate Get Changes for Updated Item in SharePoint

Now, follow the steps below to create a flow that sends us the field that changed and displays both the previous and current values.

  1. Go to Power Automate. Create a new Automated cloud flow. Set the trigger as: When an item or a file is modified (SharePoint). Choose your SharePoint site and the Task Management list.
Power Automate SharePoint Get Column Changes
  1. Then add ‘Get changes for an item or a file (properties only)‘ and provide the below parameters:
    • Site Address: Please provide the site address where the list is located.
    • List or Library Name: Select the SharePoint list Task Management.
    • Id: Provide the Id from ‘Get changes for an item or a file (properties only)’ dynamic content.
    • Since: provide the Trigger Window Start Token from dynamic content.
power automate get changes for an item or a file (properties only)

This action returns the value in a true or false format.

Now let’s extract which fields were changed using the Select action. This helps us dynamically loop through only the fields that were modified.

  1. Now add the Select action, and in the From field, enter the following expression:
split(replace(replace(string(outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/ColumnHasChanged']),'{',''),'}',''),',')

This expression converts the ColumnHasChanged object into an array by removing the braces and splitting the result by commas.

  1. Next, in the Map section of the Select action, extract the field name and whether it changed. Add the below:
{
 "Name" : @{replace(split(item(),':')[0],'"','')},
 "Value" : @{replace(split(item(),':')[1],'"','')}
}
power automate track changes in sharepoint list

Now that we’ve converted the ColumnHasChanged object into an array of field names and values (using the Select action), we’ll use a Filter Array action to keep only the columns that actually changed.

  1. Add the Filter array action. In the From field, select the output of the Select action. In the Condition, set it up like this:
item()?['Value']  is equal to   'true'
restore previous version of sharepoint list item using power automate

At this point, we have a filtered list of fields that actually changed. Now, let’s extract only the names of these fields using another Select action.

  1. Add another Select from the Data Operations group. In the From field, choose the output of the Filter array action (the previous step). Now, click Switch to text mode in the Map section. In the text box that appears, enter the following expression:
item()?['Name']
How do I get items from SharePoint list in Power Automate

To retrieve the previous values of the fields that have changed, we’ll call SharePoint’s version history API using the “Send an HTTP request to SharePoint” action.

  1. Click + New Step and search for Send an HTTP request to SharePoint. Provide the following details:
    • Site Address: Select your SharePoint site (wherever your list is stored)
    • Method: GET
    • Uri:
_api/lists/GetByTitle('Issue tracker')/items(@{triggerBody()?['ID']})/versions(@{outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/SinceVersionId']})?$Select=@{join(body('Select_1'),',')}
How to get previous value of updated SharePoint List Item

Now that you’ve already retrieved the previous version of the item using SinceVersionId, let’s also get the current version using UntilVersionId. This will help you create a clear comparison of before and after.

  1. Click + New Step and then search for ‘Send an HTTP request to SharePoint’. Then provide the following parameters:
    • Site Address: Select your SharePoint site (wherever your list is stored)
    • Method: GET
    • Uri:
_api/lists/GetByTitle('Task Management')/items(@{triggerBody()?['ID']})/versions(@{outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/UntilVersionId']})?$Select=@{join(body('Select_1'),',')}
Get Notified For List Item Changes Using Power Automate

At this point, you’ve retrieved both the previous and current values of the changed columns using two HTTP requests.

  1. Now add a Select action. In the From field, paste this expression:
split(replace(replace(string(body('Send_an_HTTP_request_to_SharePoint')),'{',''),'}',''),',')
  1. In the Map section, add the following fields:
Field NameExpression
Titlereplace(split(item(),’:’)[0],'”‘,”)
Previous valuereplace(split(item(),’:’)[1],'”‘,”)
Current valuebody(‘Send_an_HTTP_request_to_SharePoint_1’)?[‘body’]?[json(item())]

Note:

Make sure the name of your second HTTP request step (for the current values) is correctly referenced. If it’s named differently, update Send_an_HTTP_request_to_SharePoint_1 accordingly.

power automate how to get previous value of updated sharepoint list item
  1. Click + New Step and search for Create HTML table (from Data Operations). In the From field, select the Select action output from the previous step. Set the Columns dropdown to: Automatic.
Get previous value(s) of modified SharePoint column(s) in Power Automate
  1. Add ‘Send an Email (V2)‘ Action and provide the below parameters:
    • To: Your recipient (Manager Email/ Created by Email)
    • Subject: Task Updated – @{triggerOutputs()?[‘body/Title’]}
    • Body: Provide below:
Hello,

The following task from the Task Management list has been updated:

Task: @{triggerOutputs()?['body/Title']}

Modified By: @{triggerOutputs()?['body/Editor']?['Email']}

Modified On: @{triggerOutputs()?['body/Modified']}

Changed Fields:
@{outputs('Create_HTML_table')}

Regards,
Power Automate Bot
Retrieve old values before item update using Power automate
  1. Click the Save button in the top-right corner of Power Automate. Make sure there are no errors in any of the actions. If needed, click “Test” and select “Manually.”
  2. Go to your SharePoint list, in this case, it’s called Task Management. Edit an item:
How to get previous versions in SharePoint

Once the flow runs, it detects which fields were changed. Retrieves the previous and current values. Builds an HTML table. Sends an email with a clear summary of the changes. You should receive an email that looks like this:

Get Changes Item In SharePoint List Using Power Automate

Perhaps you are not receiving the above table because I added CSS to the ‘Send an email’ action. If you want a table like this, add the following CSS:

<style>
table {
  border: 1px solid #1C6EA4;
  background-color: #e3e3e3;
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}
table td, table th {
  border: 1px solid #AAAAAA;
  padding: 3px 2px;
}
table tbody td {
  font-size: 13px;
text-align: center;
}
table thead {
  background: #287086;
  border-bottom: 2px solid #444444;
}
table thead th {
  font-size: 15px;
  font-weight: bold;
  color: white;
text-align: center;
  border-left: 2px solid #D0E4F5;
}
table thead th:first-child {
  border-left: none;
}
</style>

Note:

If your flow is returning null values when using Send an HTTP request to SharePoint to retrieve version information, it’s likely because the request is not returning data in the correct format.

To fix this, add the Accept header to ensure SharePoint returns JSON data.

Tracking changes in SharePoint list items is incredibly useful when you’re managing tasks, approvals, or any collaborative work. With Power Automate, you can easily detect which fields were updated and even compare the previous and current values.

Also, you may like some more Power Automate tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App