How to Update SharePoint list items using Power Automate?

Do you want to update item in Power Automate? In this tutorial, I will show you how to update SharePoint list item in Power Automate. We will see a complete example of the “Power Automate update SharePoint list item”.

Recently I got a requirement where I needed to automatically update a SharePoint list item based on the Team Value. For example, If the team value is SharePoint, then the SharePoint Details will automatically update for the created list item using a flow.

Here I am going to use the below SharePoint TaskListDetails list having the below columns.

Column NameColumn Type
TaskNamedefault title column
TeamChoice data type (SharePoint, Python, Database, Other)
TaskDescriptionMultiple lines of text
Assigned ToPerson or Group column
StatusChoice data type (Completed, Yet to start, InProgress)
StartDateDate Type
EndDateDate Type
power automate update sharepoint list item

Now, we will start creating a flow to update the SharePoint list item using Power Automate flow.

Update SharePoint list items using Power Automate

Let us see how to update SharePoint list items using Power Automate.

Follow the below steps to achieve this:

Step-1:

Create an automated cloud flow with the trigger when an item is created and provide the required parameters:

  • SiteAddress: Select the SharePoint site address
  • ListName: Select the list Name from the dropdown (Here I have configured my SharePoint List).
update item power automate

Step-2:

Add a new step, choose the Switch control, and pass the Team Value from the dynamic content.

triggerOutputs()?['body/TaskName/Value']
power automate update item

Now, we will add different cases under the switch control,

Case-1:

In case 1, we will check if the Team value is equal to SharePoint, If yes we will add a compose data operation and pass the input value.

The @{triggerOutputs()?['body/Title']} is assigned to the SharePoint Team.

Later, we will use the Update item action and provide the required parameters:

  • Site Address: Choose the SharePoint site address from the dropdown
  • List Name: Select the list Name from the dropdown (Here I have configured my SharePoint List).
  • ID: Pass the ID from the dynamic content value.
See also  Power Bi Bar Chart - How to Create

Once the ID has been the TaskListDetails column field will be displayed:

  • Task Description: pass the outputs of the compose data operation, to update the Multiple line of text field.
outputs('Compose')
  • AssignedTo Claims: pass the user name to update the Person or Group field. Here I have passed the user name as ( Adele Vance).
  • Status Value: select the status value as yet to Start from the dropdown to update the choice field value.
  • StartDate: From the dynamic content, pass the created date to update the Date field.
triggerOutputs()?['body/Created']
  • EndDate: use the below expression, which is calculated from the 7 days of the StartDate field, and update it to the EndDate field.
formatDateTime(addDays(triggerOutputs()?['body/Created'],7,'yyyy-MM-dd'))
update item sharepoint power automate

Case-2:

In case 2, we will check if the Team value is equal to Python, If yes we will add a compose data operation and pass the input value.

The @{triggerOutputs()?['body/Title']} is assigned to the Python Team.

Later, we will use the Update item action and provide the required parameters:

  • Site Address: Choose the SharePoint site address from the dropdown
  • List Name: Select the list Name from the dropdown (Here I have configured my SharePoint List).
  • ID: Pass the ID from the dynamic content value.

Once the ID has been the TaskListDetails column field will be displayed:

  • Task Description: pass the outputs of the compose data operation, to update the Multiple line of text field.
outputs('Compose')
  • AssignedTo Claims: pass the user name to update the Person or Group field. Here I have passed the user name as (Alex Wilber).
  • Status Value: select the status value as InProgress from the dropdown to update the choice field value.
  • StartDate: From the dynamic content pass the created date to update the Date field.
triggerOutputs()?['body/Created']
  • EndDate: use the below expression, which is calculated from the 3 days of the StartDate field, and update it to the EndDate field.
formatDateTime(addDays(triggerOutputs()?['body/Created'],3,'yyyy-MM-dd'))
power automate update list item

Case-3:

See also  How to format a currency column in Power Apps?

In case 3, we will check if the Team value is equal to Database, If yes we will add a compose data operation and pass the input value.

The @{triggerOutputs()?['body/Title']} is assigned to the Database Team.

Later we will use the Update item action and provide the required parameters:

  • Site Address: Choose the SharePoint site address from the dropdown
  • List Name: Select the list Name from the dropdown (Here I have configured my SharePoint List).
  • ID: Pass the ID from the dynamic content value.

Once the ID has been the TaskListDetails column field will be displayed:

  • Task Description: pass the outputs of the compose data operation, to update the Multiple line of text field.
outputs('Compose')
  • AssignedTo Claims: pass the user name to update the Person or Group field. Here I have passed the user name as (Grady Archie).
  • Status Value: select the status value as yet to Start from the dropdown to update the choice field value.
  • StartDate: From the dynamic content pass the created date to update the Date field.
triggerOutputs()?['body/Created']
  • EndDate: use the below expression, which is calculated from the 5 days of the StartDate field, and update it to the EndDate field.
formatDateTime(addDays(triggerOutputs()?['body/Created'],5,'yyyy-MM-dd'))
update item in sharepoint list power automate

Default case:

In the default case, if the Team value is equal to Other or not SharePoint, Python, or Database then it will update only null values to the SharePoint list.

Add an update item action and provide the required parameters:

  • Site Address: Choose the SharePoint site address from dropdown
  • List Name: Select the list Name from the dropdown (Here I have configured my SharePoint List).
  • ID: Pass the ID from the dynamic content value.
See also  Run JavaScript after page loaded completely using jQuery

Once the ID has been the TaskListDetails column field will be displayed, pass the null value under the expression tab.

null
power automate modify sharepoint list item

Our complete flow looks like the below:

update sharepoint list from power automate

Step-3:

Save and test the flow. The flow will trigger only when an item is created in the SharePoint list.

Test Case-1:

Here I have created a new list item with the Team Value Database as shown below:

update sharepoint list using power automate

Once the flow runs successfully like the below:

power automate change value in sharepoint list

The SharePoint list automatically gets updated based on team value by using the update item action in the flow.

power automate update item in sharepoint list

Test Case-2:

Here I have created a new list item with the Team Value Other as shown below:

sharepoint update item power automate

Once the flow runs successfully like the below:

power automate sharepoint update item

The SharePoint list automatically gets updated only with null values by using the update item action in the flow. In the below screenshot, we can see that the highlighted item has empty values.

update sharepoint list power automate

This is how to update SharePoint list items using Power Automate flow.

Conclusion

I hope now you have an idea of how to use the Power Automate update item flow action. With an example, I have shown you how to update item in Power Automate, especially, an example of Power Automate update SharePoint list item.

You may also like:

  • Do you have any suggestions on updating items on deeper levels in a sub folder? It seems that the update item connector only works for one level down. If you have deeper levels, the update item doesn’t work.

  • Hi
    I am creating a Leave Request Form in PowerApps, added Power Automate flow. Everything working fine.

    Now, I need to update my LeaveBalance List (AppliedLeave Column) with the data from Leave List(TotalDays column) once the Leave is approved.

    Need your urgent help and advice on this please. (of course if you kindly agree for your valuable advice in free as I am learning this)

  • >