In this Power Automate or Flow tutorial, we will discuss how to update SharePoint List item using Power Automate or Microsoft flow.
So, here we will create a Microsoft flow that will update the item in the SharePoint Online List automatically. Let us see an example of the Power Automate update SharePoint list item.
Update SharePoint List Item using Microsoft Flow
Here we will see how to update SharePoint List Item with multiple conditions using Microsoft Flow.
I have a SharePoint task list, when a user creates an item in the task list according to the technology field value one person will be assigned automatically to that task.
For example:
- If a user selects SharePoint, automatically a person (us[email protected]) will be assigned in the Assigned To field.
- Similarly, if a user selects Python, automatically a person (us[email protected]) will be assigned in the Assigned To field.
- If the user changes the Technology to SQL Server from Python, then automatically, the Assigned To field will be charged to [email protected].
This will work in the same way, for both while creating an item as well as while editing the sharepoint list item.
Steps to Update SharePoint List item using Power Automate
Step 1: Create SharePoint Online task list
I have already created a task list in SharePoint Online which had the 7 columns with the required column type.
Column Name | Column Type |
---|---|
Title | Single Line of text |
Description | Multi-line of text |
Assigned to | Choice |
Status | Choice |
Technology | Choice |
Start Date | Date and Time |
Due Date | Date and Time |
Previous Technology | Single line of text |
Once the SharePoint Task list is created, we will move towards the next steps to create a Flow.
Step 2: Create A Flow in Power Automate
Now, we will create a flow, which will trigger when we create a task or modify a task in the sharepoint task list.
- Log in to the Power Automate, then click on “Create” icon in the navigation bar to create a new flow, then select Automated cloud Flow.
- Now Provide the Flow name, then select the trigger i.e. When an item is created or modified, to start the flow. Then click on Create.
Step 3: When an item is created or modified
In this step, we will provide the site address and the list name in which you want to update the task.
Also, read Power Automate Switch Case Multiple Conditions
Step 4: Condition to check the technology value and update items with the assigned person
Here we have 4 choices in the technology column these are SharePoint, Python, SQL, and MongoDB. So we will create 4 conditions if one condition is satisfied then that technology item will be updated in the task list with the assigned person.
- Now click on the Next Step, to add the condition, then select the condition Action from choose an Operation.
- Now provide the condition for sharePoint, i.e. Technology value is equal to SharePoint.
- If the above condition is satisfied then If yes section will run, so add an action to Update item.
- Then in the Update item for SharePoint, provide the site address, list name, id, title, Start date, and in the assigned to add the person email id(hard coded value).
- In the previous technology assign the technology value from the dynamic content, so previous technology field store the value of the technology field.
- If the condition for SharePoint is False, then it will check if no part of the condition in the flow, so here we will add the another condition for python i.e. technology value is equal to Python.
- Then in if yes part add the updated item action which will update the task with python technology, and assign the person(with the hard coded value).
- In the previous technology assign the technology value from the dynamic content.
- And if the condition for python is also false then it will check the if no part of the condition for python, so here we will add another condition i.e. Technology value is equal to SQL.
- If the condition for SQL is true, in similar way you can add the update item for SQL.
- In the previous technology assign the technology value from the dynamic content
- If the condition for SQL is also false, then it will check the if no part of the condition for SQL, so here we will add another Condition i.e. Technology value is equal to MongoDB.
- If the Condition for MongoDB is satisfied, in that condition it will go to the If yes part, so add an action to update item for MongoDB.
- In the previous technology assign the technology value from the dynamic content
Once the flow is created, click on Save and then test the flow manually, if there is no error or warning.
Read Power Automate send email from shared mailbox
Step 5: Add Trigger Condition
After saving the flow, the Power automate will throw a warning message of infinite trigger loop, this is because of ‘update item’ action in the flow would update the item, and as soon as the item is updated in SharePoint list, the flow would triggered again.
To stop this infinite trigger loop, we will add a trigger condition, which will trigger when the previous technology value is not equal to technology value, other flow will not trigger.
So, to add the trigger condition, click the more icon in when an item is created or modified.
Then click on setting-> under Trigger condition -> Click on Add.
Then add the below trigger condition:
@not(equals(triggerBody()?['Technology']?['Value'], triggerOutputs()?['body/PreviousTechnology']))
Step 6: Run the Flow
Now in SharePoint List add a task, while adding value, don’t add value to the ‘assigned to’ field.
So here I have created a task i.e. “Power Bi Sum, and I have added the technology as SharePoint. So you can see that the flow had assigned a person to that technology.
And also in Power automate you can check the flow, as I have selected SharePoint as technology, so we can check the condition for Sharepoint.
In the below screenshot you can see the condition for SharePoint is true.
As a condition for SharePoint is true, so update item for SharePoint will be updated. And you can check by expanding the update item action for SharePoint.
In this Power Automate tutorial, we learned how to update item in SharePoint Online List using Microsoft flow.
Related Microsoft Flow tutorials:
- Unable to process template language expressions in action Power Automate
- Move files from OneDrive for Business to SharePoint Online
- Microsoft Flow Example: Copy files from one SharePoint Online account or folder to another
- Microsoft Flow Example Save tweets that include specific hashtag to a SharePoint list
- Microsoft flow examples: Save Office 365 email attachments to OneDrive for Business
- Trigger Conditions in Power Automate
- Power Automate create an HTML table
- Power Automate Parse Email Body
- Power Automate SharePoint Get Items Filter Query
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)