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 Name | Column Type |
TaskName | default title column |
Team | Choice data type (SharePoint, Python, Database, Other) |
TaskDescription | Multiple lines of text |
Assigned To | Person or Group column |
Status | Choice data type (Completed, Yet to start, InProgress) |
StartDate | Date Type |
EndDate | Date Type |
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).
Step-2:
Add a new step, choose the Switch control, and pass the Team Value from the dynamic content.
triggerOutputs()?['body/TaskName/Value']
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.
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'))
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'))
Case-3:
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'))
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.
Once the ID has been the TaskListDetails column field will be displayed, pass the null value under the expression tab.
null
Our complete flow looks like the below:
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:
Once the flow runs successfully like the below:
The SharePoint list automatically gets updated based on team value by using the update item action in the flow.
Test Case-2:
Here I have created a new list item with the Team Value Other as shown below:
Once the flow runs successfully like the below:
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.
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:
- Save Office 365 Email Attachments to OneDrive for business using Power Automate
- Delete Files Older than 3 Years from SharePoint Document Library Using Power Automate
- Power Automate Copy Files from OneDrive to SharePoint
- How to Change Trigger in Power Automate
- How to Extract Numbers from Email Subjects in Power Automate?
- How to Get Distinct Values from SharePoint List using Power Automate?
- Post an Adaptive Card to Microsoft Teams Using Power Automate
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.
This works, but its also looping and creating new items. How do I fix that?
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.
Thanks for the Trigger tip, solved my issue!
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)
How to update image sharepoint list by power automate on trigger powerapps ?