How to Update SharePoint List Items from Excel using Power Automate?

Recently, I got a requirement to update SharePoint list items from an Excel file using Power Automate. The client had an Excel file and wanted to update these records in a SharePoint Online list.

In this tutorial, I will explain how to update SharePoint list items from an Excel spreadsheet using Power Automate.

Update SharePoint List Items from Excel by Power Automate

Scenario: I have a SharePoint list(Employee Details) with a few columns, along with two list items in it, as shown in the screenshot:

Column NameData Type
Employee IDSingle line of text (Title)
Employee NameSingle line of text
Joining DateDate & time
DepartmentChoice
Permanent AddressMultiple lines of text
PF Included?Yes/No
How to update SharePoint list items from Excel using Power Automate

In the Excel spreadsheet (Employee Details), I have four items.

Refer to the image below:

Power Automate update SharePoint list from excel

My requirement is to update the SharePoint list items with data from the Excel file. If the SharePoint list item already exists (based on Employee ID), update all the list column values properly with the Excel values; otherwise, it will add it as a new item in the SharePoint list.

  1. From the Power Automate Home page, create a Scheduled cloud flow to run daily, and then configure the parameters as below:
    • Starting: Select a date from the calendar at a specific time.
    • Repeat Every: Add interval as 1.
    • Frequency: Choose a Day from the dropdown.

Then, click on the Create button. Then, the recurrence trigger will be added.

Update SharePoint list from excel using Power Automate
  1. To retrieve the data from an Excel sheet, add the ‘List rows present in a table‘ action. Provide the following parameters:
    • Location: Choose the site location or OneDrive where the file is present.
    • Document Library: Select the document library where you stored the Excel sheet.
    • File: Choose the file path from the drop-down.
    • Table: Select Table from the drop-down.
Update SharePoint list from Excel Power Automate
  1. Now, I wanted to retrieve the items from a SharePoint list. To retrieve the SharePoint list items, use the Get Items action. Provide Site Address and List Name.
  2. Click the Show All button to display all advanced parameters. Provide the filter query to retrieve the items that match the data in the Excel.
    • Filter Query: Copy and paste the below code. Give the Internal name of a SharePoint list column.
Title eq '@{items('For_each')?['Employee ID']}'

For each loop will be added automatically.

Update SharePoint list with Excel Items Power Automate
  1. Next, let’s add a Condition action to verify the length of the items retrieved from a SharePoint list.

If the length equals zero, it means no items were found in the SharePoint list based on the given condition.

So, under the True branch, use the Create item action to add a new item to the SharePoint list. Under the False branch, use the Update item action to update the existing list items.

Choose ValueOperatorChoose Value
length(outputs(‘Get_items’)?[‘body/value’])is equal to0
How to Update SharePoint List from Excel Using Power Automate
  1. Under the True branch, take a Create item action that adds a new item to the SharePoint list.
    • Configure the Site Address and List Name.
    • Click “Show all” to display the Advanced parameters. Add the values provided in the table below that are relevant to the specific field.
Column NameValue
Title
Employee Name
Joining Date
Permanent Address
Choose the value of dynamic content from Excel
PF Included?if(equals(item()?[‘PF Included’],’Yes’),true,false)
Department Valueitem()?[‘Department ‘]
Update SharePoint List Items from Excel by Power Automate

Now, we will write the False branch. This will update the SharePoint list items from the Excel file.

  1. Under the False branch, take a Compose action to add the ‘PF Included?’ field.
    • Inputs: Add the code below.
if(equals(item()?['PF Included'],'Yes'),true,false)

In the above code, replace the column name with your Excel column name.

Power Automate Update SharePoint list with Excel Items
  1. After that, take the Update item action. Set parameters such as Site Address and List Name.
    • Id: Select ID from the dynamic content of Get items.

Click “Show all” to display the Advanced parameters. Provide the values as shown in the table below.

Column NameValue
Title
Employee Name
Joining Date
Permanent Address
Choose the value of dynamic content from Excel
PF Included?outputs(‘Compose_-_PF_Included’)
Department Valueitem()?[‘Department ‘]
Update SharePoint list items from Excel Power Automate
  1. Once the Power Automate flow is ready, click the Save button to save it. Test it manually. When the flow executes successfully, you can see the outputs that are placed below from the True and False branches.

True Branch Output:

  1. The new items will be created in the SharePoint list, taking the items from the Excel spreadsheet. You can refer to the image below.
Bulk update SharePoint list from excel Power Automate

False Branch Output:

Input: SharePoint list items with blank values.

Update Excel Data to SharePoint List using Power Automate

Output: SharePoint list items with updated values.

Updating SharePoint List from Excel data Using Power Automate

In this tutorial, I have explained how to update a SharePoint list with Excel items using Power Automate.

I hope you found this tutorial helpful. Please mention your suggestions and thoughts in the comment section.

You may also visit:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

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

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…